From 0fd59acc7086706db17cc2eb2842bd7f583a4844 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 21 Mar 2011 16:04:06 +0100 Subject: Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) --- Lib/getopt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = '' -- cgit v0.12