summaryrefslogtreecommitdiffstats
path: root/Lib/compileall.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-27 13:15:45 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-27 13:15:45 (GMT)
commitc7acf2a106caacc11397e35afe054816fd6181fa (patch)
tree3eb0a826eabd8d7968198399eb28b5efb9902286 /Lib/compileall.py
parentcebfa70a794ba3d4aeda681b3164123d934d1c28 (diff)
downloadcpython-c7acf2a106caacc11397e35afe054816fd6181fa.zip
cpython-c7acf2a106caacc11397e35afe054816fd6181fa.tar.gz
cpython-c7acf2a106caacc11397e35afe054816fd6181fa.tar.bz2
handle class exceptions
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r--Lib/compileall.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index cd02851..3120284 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -30,7 +30,10 @@ def compile_dir(dir, maxlevels = 10):
print '\n[interrupt]'
break
except:
- print 'Sorry:', sys.exc_type + ':',
+ if type(sys.exc_type) == type(''):
+ exc_type_name = sys.exc_type
+ else: exc_type_name = sys.exc_type.__name__
+ print 'Sorry:', exc_type_name + ':',
print sys.exc_value
elif maxlevels > 0 and \
name != os.curdir and name != os.pardir and \