commit | 756aa93763f30638605246070424798f2601b263 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Apr 07 03:04:01 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Apr 07 03:04:01 2007 +0000 |
tree | 1c8380057fde788f43aaf966868b212d8e371e8e | |
parent | 9be5597abfeaa13a1b79c1d888ce6f120458b6ae [diff] |
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 9551982..a74b97b 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py
@@ -2187,7 +2187,7 @@ 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])