summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-12-03 19:19:17 (GMT)
committerÉric Araujo <merwok@netwok.org>2010-12-03 19:19:17 (GMT)
commita9c7a8fa5bded740bba314cb07ebd3c99eba928e (patch)
treee856a1a97458a97a330bc0c46c753a04efa583c5 /Lib/argparse.py
parentbed81c882b153913dddc805ae0d6620b5058d0c0 (diff)
downloadcpython-a9c7a8fa5bded740bba314cb07ebd3c99eba928e.zip
cpython-a9c7a8fa5bded740bba314cb07ebd3c99eba928e.tar.gz
cpython-a9c7a8fa5bded740bba314cb07ebd3c99eba928e.tar.bz2
Fix incorrect use of gettext in argparse (#10497).
Steven, the maintainer of argparse, agreed to have this committed without tests for now, since the fix is obvious. See the bug log.
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 855ff5b..63713c6 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1080,7 +1080,7 @@ class _SubParsersAction(Action):
parser = self._name_parser_map[parser_name]
except KeyError:
tup = parser_name, ', '.join(self._name_parser_map)
- msg = _('unknown parser %r (choices: %s)' % tup)
+ msg = _('unknown parser %r (choices: %s)') % tup
raise ArgumentError(self, msg)
# parse all the remaining options into the namespace
@@ -1121,7 +1121,7 @@ class FileType(object):
elif 'w' in self._mode:
return _sys.stdout
else:
- msg = _('argument "-" with mode %r' % self._mode)
+ msg = _('argument "-" with mode %r') % self._mode
raise ValueError(msg)
# all other arguments are used as file names