Commits

Samuel Bronson committed aa2e180

Clarify the sys.exit()-avoidance countermeasures.

  • Participants
  • Parent commits be1f12b

Comments (0)

Files changed (1)

pyprof2calltree.py

         # Try to deal with programs (e.g., bzr) that avoid sys.exit(),
         # but still run atexit handlers.
         import atexit
-        atexit.register(exit)
-
+        atexit.register(sys.exit)
+        # sys.exit() raises SystemExit, which we catch below.
         try:
             try:
                 prof = prof.run('execfile(%r)' % (sys.argv[0],))