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

This commit is contained in:
Victor Stinner 2010-10-24 21:12:26 +00:00
parent 2ebe697267
commit e882aac16d
1 changed files with 1 additions and 1 deletions

View File

@ -539,7 +539,7 @@ if supports_bytes_environ:
def _fscodec():
encoding = sys.getfilesystemencoding()
if encoding == 'mbcs':
errors = None # strict
errors = 'strict'
else:
errors = 'surrogateescape'