From 06dbff3b1f16dc232df0190cfed4b3af81aecda3 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 5 Mar 2010 15:17:26 +0000 Subject: [PATCH] sys.getdefaultencoding() can return None. --- Lib/test/test_imp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 3110ea9880a..627e42f9504 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -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