summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 6aed172..80d7925 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -604,7 +604,10 @@ class PyZipFile(ZipFile):
import py_compile
if self.debug:
print "Compiling", file_py
- py_compile.compile(file_py, file_pyc)
+ try:
+ py_compile.compile(file_py, file_pyc, None, True)
+ except py_compile.PyCompileError,err:
+ print err.msg
fname = file_pyc
else:
fname = file_pyc