Commit 42671aea authored by Jakub Kulík's avatar Jakub Kulík Committed by Julien Palard

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

parent 7183064e
......@@ -1214,8 +1214,9 @@ class FileType(object):
return open(string, self._mode, self._bufsize, self._encoding,
self._errors)
except OSError as e:
message = _("can't open '%s': %s")
raise ArgumentTypeError(message % (string, e))
args = {'filename': string, 'error': e}
message = _("can't open '%(filename)s': %(error)s")
raise ArgumentTypeError(message % args)
def __repr__(self):
args = self._mode, self._bufsize
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment