summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-03-05 15:17:26 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-03-05 15:17:26 (GMT)
commit06dbff3b1f16dc232df0190cfed4b3af81aecda3 (patch)
treecf797dadc57f4e97ea30b00f25f73a7fa428d4af /Lib
parent76e0d1a6efac2efbb6b9de739d43be827e7ea8ec (diff)
downloadcpython-06dbff3b1f16dc232df0190cfed4b3af81aecda3.zip
cpython-06dbff3b1f16dc232df0190cfed4b3af81aecda3.tar.gz
cpython-06dbff3b1f16dc232df0190cfed4b3af81aecda3.tar.bz2
sys.getdefaultencoding() can return None.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_imp.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index 3110ea9..627e42f 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