Mercurial > cpython-lru_cache-weakref
diff Lib/argparse.py @ 66655:83ad00a3a489
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.
| author | Éric Araujo <merwok@netwok.org> |
|---|---|
| date | Fri, 03 Dec 2010 19:19:17 +0000 |
| parents | ff6f39b3c38e |
| children | 4c9844732925 |
line wrap: on
line diff
--- a/Lib/argparse.py Fri Dec 03 19:14:17 2010 +0000 +++ b/Lib/argparse.py Fri Dec 03 19:19:17 2010 +0000 @@ -1080,7 +1080,7 @@ 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 @@ 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
