changeset: 68806:160823d258b5 user: Antoine Pitrou date: Mon Mar 21 16:04:06 2011 +0100 files: Lib/getopt.py description: Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) diff -r 74d3dc78f0db -r 160823d258b5 Lib/getopt.py --- a/Lib/getopt.py Mon Mar 21 13:26:24 2011 +0100 +++ b/Lib/getopt.py Mon Mar 21 16:04:06 2011 +0100 @@ -34,7 +34,11 @@ __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 = ''