(cls, func)
| 294 | |
| 295 | @classmethod |
| 296 | def run(cls, func): |
| 297 | try: |
| 298 | return func() |
| 299 | except KeyboardInterrupt: |
| 300 | raise |
| 301 | except Exception: |
| 302 | import pdb |
| 303 | |
| 304 | print( |
| 305 | 'Entering interactive debugger. Type "bt" to print ' |
| 306 | 'the full stacktrace. Type "help" to see command listing.') |
| 307 | print(sys.exc_info()[1]) |
| 308 | |
| 309 | |
| 310 | pdb.post_mortem() |
| 311 | sys.exit(1) |
| 312 | raise |
| 313 | |
| 314 | |
| 315 | def raiseIfNotEqual(a, b, msg): |