Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0fd59ac

Browse files
committed
Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9)
1 parent 499dfcf commit 0fd59ac

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/getopt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
__all__ = ["GetoptError","error","getopt","gnu_getopt"]
3535

3636
import os
37-
from gettext import gettext as _
37+
try:
38+
from gettext import gettext as _
39+
except ImportError:
40+
# Bootstrapping Python: gettext's dependencies not built yet
41+
def _(s): return s
3842

3943
class GetoptError(Exception):
4044
opt = ''

0 commit comments

Comments
 (0)