mirror of https://github.com/python/cpython.git
sys.getdefaultencoding() can return None.
This commit is contained in:
parent
76e0d1a6ef
commit
06dbff3b1f
|
@ -86,6 +86,7 @@ def test_issue5604(self):
|
||||||
|
|
||||||
# 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
|
||||||
|
|
Loading…
Reference in New Issue