[Python-checkins] cpython: Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9)
antoine.pitrou
python-checkins at python.org
Mon Mar 21 16:04:36 CET 2011
http://hg.python.org/cpython/rev/160823d258b5
changeset: 68806:160823d258b5
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Mar 21 16:04:06 2011 +0100
summary:
Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9)
files:
Lib/getopt.py
diff --git a/Lib/getopt.py b/Lib/getopt.py
--- a/Lib/getopt.py
+++ b/Lib/getopt.py
@@ -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 = ''
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list