mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
str.encode() doesn't accept None as errors: use 'strict' instead
This commit is contained in:
parent
2ebe697267
commit
e882aac16d
1 changed files with 1 additions and 1 deletions
|
|
@ -539,7 +539,7 @@ def getenvb(key, default=None):
|
|||
def _fscodec():
|
||||
encoding = sys.getfilesystemencoding()
|
||||
if encoding == 'mbcs':
|
||||
errors = None # strict
|
||||
errors = 'strict'
|
||||
else:
|
||||
errors = 'surrogateescape'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue