Commit e882aac1 authored by Victor Stinner's avatar Victor Stinner

str.encode() doesn't accept None as errors: use 'strict' instead

parent 2ebe6972
...@@ -539,7 +539,7 @@ if supports_bytes_environ: ...@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment