From: Guido van Rossum Date: Sat, 7 Apr 2007 03:04:01 +0000 (+0000) Subject: A class used as an exception should inherit from Exception. X-Git-Tag: v3.0a1~1087 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=756aa93763f30638605246070424798f2601b263;p=python A class used as an exception should inherit from Exception. (Should be backported to 2.6, really.) --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 9551982315..a74b97b4d0 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -2187,7 +2187,7 @@ def ispath(x): def cli(): """Command-line interface (looks at sys.argv to decide what to do).""" import getopt - class BadUsage: pass + class BadUsage(Exception): pass # Scripts don't get the current directory in their path by default. scriptdir = os.path.dirname(sys.argv[0])