summaryrefslogtreecommitdiffstats
path: root/Lib/getopt.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/getopt.py')
-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 = ''