mirror of https://github.com/python/cpython
str.encode() doesn't accept None as errors: use 'strict' instead
This commit is contained in:
parent
2ebe697267
commit
e882aac16d
|
@ -539,7 +539,7 @@ if supports_bytes_environ:
|
||||||
def _fscodec():
|
def _fscodec():
|
||||||
encoding = sys.getfilesystemencoding()
|
encoding = sys.getfilesystemencoding()
|
||||||
if encoding == 'mbcs':
|
if encoding == 'mbcs':
|
||||||
errors = None # strict
|
errors = 'strict'
|
||||||
else:
|
else:
|
||||||
errors = 'surrogateescape'
|
errors = 'surrogateescape'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue