A class used as an exception should inherit from Exception.

(Should be backported to 2.6, really.)
This commit is contained in:
Guido van Rossum 2007-04-07 03:04:01 +00:00
parent 9be5597abf
commit 756aa93763
1 changed files with 1 additions and 1 deletions

View File

@ -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])