projects
/
python3.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f247083
)
lib-argparse
author
Matthias Klose
<doko@debian.org>
Thu, 30 Jul 2020 10:10:07 +0000
(11:10 +0100)
committer
Peter Michael Green
<plugwash@raspbian.org>
Thu, 30 Jul 2020 10:10:07 +0000
(11:10 +0100)
# DP: argparse.py: Make the gettext import conditional
# DP: argparse.py: Make the gettext import conditional
Gbp-Pq: Name lib-argparse.diff
Lib/argparse.py
patch
|
blob
|
history
diff --git
a/Lib/argparse.py
b/Lib/argparse.py
index 2fb1da59f942cff7fbfc136ebd08ee8ec14bcbaa..840d3b11624dd212274ccd09a687d568529ecd7b 100644
(file)
--- a/
Lib/argparse.py
+++ b/
Lib/argparse.py
@@
-89,7
+89,16
@@
import os as _os
import re as _re
import sys as _sys
-from gettext import gettext as _, ngettext
+try:
+ from gettext import gettext as _, ngettext
+except ImportError:
+ def _(message):
+ return message
+ def ngettext(singular,plural,n):
+ if n == 1:
+ return singular
+ else:
+ return plural
SUPPRESS = '==SUPPRESS=='