Commits

Guido van Rossum  committed 8df574a

cope with class exceptions

  • Participants
  • Parent commits 763eb47
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Demo/stdwin/python.py

 		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: