Skip to content

Commit 80e637e

Browse files
author
benjamin.peterson
committed
raise a better error
git-svn-id: http://svn.python.org/projects/python/trunk@67348 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent af04d3f commit 80e637e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/optparse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def take_action(self, action, dest, opt, value, values, parser):
799799
parser.print_version()
800800
parser.exit()
801801
else:
802-
raise RuntimeError, "unknown action %r" % self.action
802+
raise ValueError("unknown action %r" % self.action)
803803

804804
return 1
805805

0 commit comments

Comments
 (0)