Revert "bpo-37785: Fix xgettext warning in argparse (GH-15161)" (GH-16082)

This reverts commit b50eff6590 because
it's an incompatible change that would have broken the existing
translations.
This commit is contained in:
Julien Palard 2019-09-13 12:20:14 +02:00 committed by GitHub
parent b50eff6590
commit f14fcbf299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -1207,9 +1207,8 @@ class FileType(object):
return open(string, self._mode, self._bufsize, self._encoding,
self._errors)
except OSError as e:
args = {'filename': string, 'error': e}
message = _("can't open '%(filename)s': %(error)s")
raise ArgumentTypeError(message % args)
message = _("can't open '%s': %s")
raise ArgumentTypeError(message % (string, e))
def __repr__(self):
args = self._mode, self._bufsize

View File

@ -1 +0,0 @@
Fix xgettext warnings in :mod:`argparse`.