mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
A class used as an exception should inherit from Exception.
(Should be backported to 2.6, really.)
This commit is contained in:
parent
9be5597abf
commit
756aa93763
1 changed files with 1 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue