sys.getdefaultencoding() can return None.
This commit is contained in:
parent
76e0d1a6ef
commit
06dbff3b1f
|
@ -86,6 +86,7 @@ class ImportTests(unittest.TestCase):
|
|||
|
||||
# the return encoding can be uppercase
|
||||
fs_encoding = sys.getfilesystemencoding().lower()
|
||||
fs_encoding = fs_encoding.lower() if fs_encoding else 'ascii'
|
||||
|
||||
# covers utf-8 and Windows ANSI code pages
|
||||
# one non-space symbol from every page
|
||||
|
|
Loading…
Reference in New Issue