summaryrefslogtreecommitdiff
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2011-04-04 01:53:02 +0200
committerSteven Bethard <steven.bethard@gmail.com>2011-04-04 01:53:02 +0200
commit7cb20a8605d79faae64cccf8bbe8418b492f0e30 (patch)
tree5beb0a6acd7f161467c5c905f77c4117e801148c /Lib/argparse.py
parent43bf045be09f50c17627bfa3dd2ce386ddf37304 (diff)
downloadcpython-git-7cb20a8605d79faae64cccf8bbe8418b492f0e30.tar.gz
Issue #9347: Fix formatting for tuples in argparse type= error messages.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index 0ef9f4ee88..63561f7cb1 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1287,13 +1287,13 @@ class _ActionsContainer(object):
# create the action object, and add it to the parser
action_class = self._pop_action_class(kwargs)
if not _callable(action_class):
- raise ValueError('unknown action "%s"' % action_class)
+ raise ValueError('unknown action "%s"' % (action_class,))
action = action_class(**kwargs)
# raise an error if the action type is not callable
type_func = self._registry_get('type', action.type, action.type)
if not _callable(type_func):
- raise ValueError('%r is not callable' % type_func)
+ raise ValueError('%r is not callable' % (type_func,))
# raise an error if the metavar does not match the type
if hasattr(self, "_get_formatter"):