]> granicus.if.org Git - python/commitdiff
Merged revisions 86985 via svnmerge from
authorÉric Araujo <merwok@netwok.org>
Fri, 3 Dec 2010 19:24:49 +0000 (19:24 +0000)
committerÉric Araujo <merwok@netwok.org>
Fri, 3 Dec 2010 19:24:49 +0000 (19:24 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86985 | eric.araujo | 2010-12-03 20:19:17 +0100 (ven., 03 déc. 2010) | 5 lines

  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.
........

Lib/argparse.py
Misc/NEWS

index 98374323c9cd8b6c41147b1b84f6dc20e700f4e7..78f4dcb228774210b52552c04d21a2f9208d6e28 100644 (file)
@@ -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
index 89894d85adfd4e84cd6307b42685d2c907a2e921..82a4cd5ae05b5e8ef032b4928b7b5438953af9d4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1,4 +1,4 @@
-+++++++++++
+:xq
 Python News
 +++++++++++
 
@@ -13,6 +13,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #10497: Fix incorrect use of gettext in argparse.
+
 - Issue #10464: netrc now correctly handles lines with embedded '#' characters.