From e882aac16db749313fcf0d073b36c73e1ab1f857 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 24 Oct 2010 21:12:26 +0000 Subject: [PATCH] str.encode() doesn't accept None as errors: use 'strict' instead --- Lib/os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/os.py b/Lib/os.py index 2e8ba92122..5c80e67eb4 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' -- 2.49.0