Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e882aac

Browse files
author
Victor Stinner
committed
str.encode() doesn't accept None as errors: use 'strict' instead
1 parent 2ebe697 commit e882aac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def getenvb(key, default=None):
539539
def _fscodec():
540540
encoding = sys.getfilesystemencoding()
541541
if encoding == 'mbcs':
542-
errors = None # strict
542+
errors = 'strict'
543543
else:
544544
errors = 'surrogateescape'
545545

0 commit comments

Comments
 (0)