summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-21 15:04:06 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-21 15:04:06 (GMT)
commit0fd59acc7086706db17cc2eb2842bd7f583a4844 (patch)
tree13ac2b4f82a87593007e7d3bec2cfffc80a11b23 /Lib
parent499dfcf29da7b7d1ca11f697cece773936c2ba42 (diff)
downloadcpython-0fd59acc7086706db17cc2eb2842bd7f583a4844.zip
cpython-0fd59acc7086706db17cc2eb2842bd7f583a4844.tar.gz
cpython-0fd59acc7086706db17cc2eb2842bd7f583a4844.tar.bz2
Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/getopt.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/getopt.py b/Lib/getopt.py
index e4cab75..3d6ecbd 100644
--- a/Lib/getopt.py
+++ b/Lib/getopt.py
@@ -34,7 +34,11 @@ option involved with the exception.
__all__ = ["GetoptError","error","getopt","gnu_getopt"]
import os
-from gettext import gettext as _
+try:
+ from gettext import gettext as _
+except ImportError:
+ # Bootstrapping Python: gettext's dependencies not built yet
+ def _(s): return s
class GetoptError(Exception):
opt = ''