]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
cope with class exceptions
authorGuido van Rossum <guido@python.org>
Wed, 22 Mar 1995 12:17:10 +0000 (12:17 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 22 Mar 1995 12:17:10 +0000 (12:17 +0000)
Demo/stdwin/python.py

index 2e0edeb834d618a0d685def64e4eb7a7f42807ea..29b0495fd7cc395e065b19177abbcdcdf8433d12 100755 (executable)
@@ -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: