mirror of
https://github.com/python/cpython.git
synced 2025-09-02 06:57:58 +00:00
Allow translating argument error messages (#17169)
This commit is contained in:
parent
a918589578
commit
b885b8f4be
1 changed files with 1 additions and 1 deletions
|
@ -766,7 +766,7 @@ class ArgumentError(Exception):
|
||||||
if self.argument_name is None:
|
if self.argument_name is None:
|
||||||
format = '%(message)s'
|
format = '%(message)s'
|
||||||
else:
|
else:
|
||||||
format = 'argument %(argument_name)s: %(message)s'
|
format = _('argument %(argument_name)s: %(message)s')
|
||||||
return format % dict(message=self.message,
|
return format % dict(message=self.message,
|
||||||
argument_name=self.argument_name)
|
argument_name=self.argument_name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue