diff options
author | Guido van Rossum <guido@python.org> | 1995-03-22 12:17:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-03-22 12:17:10 (GMT) |
commit | 795a48cd4e77ad9bcd770203f0a573f991be98be (patch) | |
tree | 3e14435a6ecb22671aac68114cc76553f5faf4be /Demo/stdwin | |
parent | ee6310a4dec960fee0ac24b5f2e14099014f9406 (diff) | |
download | cpython-795a48cd4e77ad9bcd770203f0a573f991be98be.zip cpython-795a48cd4e77ad9bcd770203f0a573f991be98be.tar.gz cpython-795a48cd4e77ad9bcd770203f0a573f991be98be.tar.bz2 |
cope with class exceptions
Diffstat (limited to 'Demo/stdwin')
-rwxr-xr-x | Demo/stdwin/python.py | 4 |
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: |