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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0fd59acc7086706db17cc2eb2842bd7f583a4844;p=thirdparty%2FPython%2Fcpython.git Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) --- diff --git a/Lib/getopt.py b/Lib/getopt.py index e4cab75c7e39..3d6ecbddb99c 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 = ''