From: Antoine Pitrou Date: Mon, 21 Mar 2011 15:04:06 +0000 (+0100) Subject: Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) X-Git-Tag: v3.3.0a1~2815 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0fd59acc7086706db17cc2eb2842bd7f583a4844;p=python Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) --- diff --git a/Lib/getopt.py b/Lib/getopt.py index e4cab75c7e..3d6ecbddb9 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 = ''