Skip to content

Commit f14fcbf

Browse files
authored
Revert "bpo-37785: Fix xgettext warning in argparse (GH-15161)" (GH-16082)
This reverts commit b50eff6 because it's an incompatible change that would have broken the existing translations.
1 parent b50eff6 commit f14fcbf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Lib/argparse.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,9 +1207,8 @@ def __call__(self, string):
12071207
return open(string, self._mode, self._bufsize, self._encoding,
12081208
self._errors)
12091209
except OSError as e:
1210-
args = {'filename': string, 'error': e}
1211-
message = _("can't open '%(filename)s': %(error)s")
1212-
raise ArgumentTypeError(message % args)
1210+
message = _("can't open '%s': %s")
1211+
raise ArgumentTypeError(message % (string, e))
12131212

12141213
def __repr__(self):
12151214
args = self._mode, self._bufsize

Misc/NEWS.d/next/Library/2019-08-07-14-49-22.bpo-37785.y7OlT8.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)