[Epydoc-commits] SF.net SVN: epydoc: [1158] trunk/epydoc/src/epydoc
Brought to you by:
edloper
From: <ed...@us...> - 2006-04-04 15:19:32
|
Revision: 1158 Author: edloper Date: 2006-04-04 08:19:28 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1158&view=rev Log Message: ----------- - Fixed exception handling bug in cli - Changed several 'except' clauses to only propagate KeyboardInterrupt, not SystemExit. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docintrospecter.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-04-04 04:45:28 UTC (rev 1157) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-04-04 15:19:28 UTC (rev 1158) @@ -690,7 +690,7 @@ if isinstance(s, str): s = decode_with_backslashreplace(s) return s - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: return UNKNOWN def apidoc_links(self, **filters): Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-04-04 04:45:28 UTC (rev 1157) +++ trunk/epydoc/src/epydoc/cli.py 2006-04-04 15:19:28 UTC (rev 1158) @@ -213,7 +213,7 @@ if options.configfiles: try: parse_configfiles(options.configfiles, options, names) - except KeyboardInterrupt,SystemExit: raise + except (KeyboardInterrupt,SystemExit): raise except Exception, e: optparser.error('Error reading config file:\n %s' % e) Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-04-04 04:45:28 UTC (rev 1157) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-04-04 15:19:28 UTC (rev 1158) @@ -223,7 +223,7 @@ # Record the module's filename if hasattr(module, '__file__'): try: module_doc.filename = unicode(module.__file__) - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: pass # If this is just a preliminary introspection, then don't do @@ -241,7 +241,7 @@ if hasattr(module, '__path__'): module_doc.is_package = True try: module_doc.path = [unicode(p) for p in module.__path__] - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: pass else: module_doc.is_package = False @@ -313,7 +313,7 @@ var_doc.is_imported = False else: var_doc.is_public = False - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: pass return module_doc @@ -342,7 +342,7 @@ try: public_names = [str(name) for name in cls.__all__] class_doc.public_names = public_names - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: pass # Start a list of subclasses. @@ -635,7 +635,7 @@ try: module = inspect.getmodule(func) if module: return module.__name__ - except KeyboardInterrupt, SystemExit: raise + except KeyboardInterrupt: raise except: pass # This fallback shouldn't usually be needed. But it is needed in @@ -823,8 +823,7 @@ else: # For importing scripts: return imp.load_source(name, filename) - except KeyboardInterrupt: - raise # don't capture keyboard interrupts! + except KeyboardInterrupt: raise except: exc_typ, exc_val, exc_tb = sys.exc_info() if exc_val is None: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |