From: Victor Stinner Date: Sun, 24 Oct 2010 21:12:26 +0000 (+0000) Subject: str.encode() doesn't accept None as errors: use 'strict' instead X-Git-Tag: v3.2a4~356 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e882aac16db749313fcf0d073b36c73e1ab1f857;p=thirdparty%2FPython%2Fcpython.git str.encode() doesn't accept None as errors: use 'strict' instead --- diff --git a/Lib/os.py b/Lib/os.py index 2e8ba9212222..5c80e67eb4d9 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -539,7 +539,7 @@ if supports_bytes_environ: def _fscodec(): encoding = sys.getfilesystemencoding() if encoding == 'mbcs': - errors = None # strict + errors = 'strict' else: errors = 'surrogateescape'