[Epydoc-commits] SF.net SVN: epydoc: [1315] trunk/epydoc/src/epydoc/cli.py
Brought to you by:
edloper
From: <ed...@us...> - 2006-08-24 06:50:47
|
Revision: 1315 Author: edloper Date: 2006-08-23 23:50:43 -0700 (Wed, 23 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1315&view=rev Log Message: ----------- Check for a bug that exists in Python 2.4's profiler; and if found, patch it before using --profile-epydoc. This profiler bug was fixed in 2.4maint, as of September 2005: <http://mail.python.org/pipermail/python-checkins/2005-September/047099.html> Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-08-23 20:10:10 UTC (rev 1314) +++ trunk/epydoc/src/epydoc/cli.py 2006-08-24 06:50:43 UTC (rev 1315) @@ -675,12 +675,18 @@ print >>sys.stderr, 'Use --debug to see trace information.' def _profile(): - try: import profile + try: from profile import Profile except ImportError: print >>sys.stderr, "Could not import profile module!" return + # There was a bug in Python 2.4's profiler. Check if it's + # present, and if so, fix it. (Bug was fixed in 2.4maint: + # <http://mail.python.org/pipermail/python-checkins/ + # 2005-September/047099.html>) + if Profile.dispatch['c_exception'] is Profile.trace_dispatch_exception: + Profile.dispatch['c_exception'] = Profile.trace_dispatch_return try: - prof = profile.Profile() + prof = Profile() prof = prof.runctx('main(*parse_arguments())', globals(), {}) except SystemExit: pass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |