sys.getdefaultencoding() can return None.

This commit is contained in:
Ezio Melotti 2010-03-05 15:17:26 +00:00
parent 76e0d1a6ef
commit 06dbff3b1f
1 changed files with 1 additions and 0 deletions

View File

@ -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