Commit 756aa937 authored by Guido van Rossum's avatar Guido van Rossum

A class used as an exception should inherit from Exception.

(Should be backported to 2.6, really.)
parent 9be5597a
......@@ -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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment