Skip to content

Commit 06dbff3

Browse files
committed
sys.getdefaultencoding() can return None.
1 parent 76e0d1a commit 06dbff3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_imp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def test_issue5604(self):
8686

8787
# the return encoding can be uppercase
8888
fs_encoding = sys.getfilesystemencoding().lower()
89+
fs_encoding = fs_encoding.lower() if fs_encoding else 'ascii'
8990

9091
# covers utf-8 and Windows ANSI code pages
9192
# one non-space symbol from every page

0 commit comments

Comments
 (0)