summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-03-22 12:17:10 (GMT)
committerGuido van Rossum <guido@python.org>1995-03-22 12:17:10 (GMT)
commit795a48cd4e77ad9bcd770203f0a573f991be98be (patch)
tree3e14435a6ecb22671aac68114cc76553f5faf4be
parentee6310a4dec960fee0ac24b5f2e14099014f9406 (diff)
downloadcpython-795a48cd4e77ad9bcd770203f0a573f991be98be.zip
cpython-795a48cd4e77ad9bcd770203f0a573f991be98be.tar.gz
cpython-795a48cd4e77ad9bcd770203f0a573f991be98be.tar.bz2
cope with class exceptions
-rwxr-xr-xDemo/stdwin/python.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Demo/stdwin/python.py b/Demo/stdwin/python.py
index 2e0edeb..29b0495 100755
--- a/Demo/stdwin/python.py
+++ b/Demo/stdwin/python.py
@@ -381,7 +381,9 @@ def do_exec(win):
except KeyboardInterrupt:
print '[Interrupt]'
except:
- msg = sys.exc_type
+ if type(sys.exc_type) == type(''):
+ msg = sys.exc_type
+ else: msg = sys.exc_type.__name__
if sys.exc_value <> None:
msg = msg + ': ' + `sys.exc_value`
if win.insertError: