diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2011-04-03 23:47:52 (GMT) |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2011-04-03 23:47:52 (GMT) |
commit | e3c11b44e37e80371fcaf71880e659a78360e8b6 (patch) | |
tree | af9b5ead00cfd00b6eb6fc1f839d01ec72e05168 /Lib/argparse.py | |
parent | 824504dd7ef218148db0b3c841af18f56af48ba1 (diff) | |
download | cpython-e3c11b44e37e80371fcaf71880e659a78360e8b6.zip cpython-e3c11b44e37e80371fcaf71880e659a78360e8b6.tar.gz cpython-e3c11b44e37e80371fcaf71880e659a78360e8b6.tar.bz2 |
Issue #9347: Fix formatting for tuples in argparse type= error messages.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 5b5598f..a9129de 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1277,13 +1277,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"): |