]> granicus.if.org Git - python/commitdiff
str.encode() doesn't accept None as errors: use 'strict' instead
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 24 Oct 2010 21:12:26 +0000 (21:12 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 24 Oct 2010 21:12:26 +0000 (21:12 +0000)
Lib/os.py

index 2e8ba92122225b3f20771356459677b57a0b004e..5c80e67eb4d9e02a4133439d00d10d6f5ceb8144 100644 (file)
--- 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'