Commit 06dbff3b authored by Ezio Melotti's avatar Ezio Melotti

sys.getdefaultencoding() can return None.

parent 76e0d1a6
...@@ -86,6 +86,7 @@ class ImportTests(unittest.TestCase): ...@@ -86,6 +86,7 @@ class ImportTests(unittest.TestCase):
# the return encoding can be uppercase # the return encoding can be uppercase
fs_encoding = sys.getfilesystemencoding().lower() fs_encoding = sys.getfilesystemencoding().lower()
fs_encoding = fs_encoding.lower() if fs_encoding else 'ascii'
# covers utf-8 and Windows ANSI code pages # covers utf-8 and Windows ANSI code pages
# one non-space symbol from every page # one non-space symbol from every page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment