summaryrefslogtreecommitdiffstats
path: root/Lib/test/script_helper.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-05-20 08:42:17 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-05-20 08:42:17 (GMT)
commited11a5d018e3fc234d7126832756a15c1af67d22 (patch)
tree4f5ee76e85299c314f1e923db480f3733bf48313 /Lib/test/script_helper.py
parent77e77a12731ad937e6567a2c0dea7dc51c80c69a (diff)
downloadcpython-ed11a5d018e3fc234d7126832756a15c1af67d22.zip
cpython-ed11a5d018e3fc234d7126832756a15c1af67d22.tar.gz
cpython-ed11a5d018e3fc234d7126832756a15c1af67d22.tar.bz2
Issue #8767: Restore building with --disable-unicode.
Original patch by Stefano Taschini.
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r--Lib/test/script_helper.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py
index 337854a..7f7c70e 100644
--- a/Lib/test/script_helper.py
+++ b/Lib/test/script_helper.py
@@ -10,7 +10,13 @@ import subprocess
import py_compile
import contextlib
import shutil
-import zipfile
+try:
+ import zipfile
+except ImportError:
+ # If Python is build without Unicode support, importing _io will
+ # fail, which, in turn, means that zipfile cannot be imported
+ # Most of this module can then still be used.
+ pass
from test.test_support import strip_python_stderr