diff options
author | Guido van Rossum <guido@python.org> | 2007-04-07 03:04:01 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-04-07 03:04:01 (GMT) |
commit | 756aa93763f30638605246070424798f2601b263 (patch) | |
tree | 1c8380057fde788f43aaf966868b212d8e371e8e /Lib | |
parent | 9be5597abfeaa13a1b79c1d888ce6f120458b6ae (diff) | |
download | cpython-756aa93763f30638605246070424798f2601b263.zip cpython-756aa93763f30638605246070424798f2601b263.tar.gz cpython-756aa93763f30638605246070424798f2601b263.tar.bz2 |
A class used as an exception should inherit from Exception.
(Should be backported to 2.6, really.)
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/pydoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 9551982..a74b97b 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]) |