Commit 1baf8298 authored by Tim Peters's avatar Tim Peters

test___all__ was failing on WIndows because locale.py doesn't really

know which names it exports.  Didn't fix its ignorance, but patched
over the consequence.
parent 19f52c2e
...@@ -16,12 +16,12 @@ import string, sys ...@@ -16,12 +16,12 @@ import string, sys
# Try importing the _locale module. # Try importing the _locale module.
# #
# If this fails, fall back on a basic 'C' locale emulation. # If this fails, fall back on a basic 'C' locale emulation.
#
# Yuck: LC_MESSAGES is non-standard: can't tell whether it exists before
# trying the import. So __all__ is also fiddled at the end of the file.
__all__ = ["setlocale","Error","localeconv","strcoll","strxfrm", __all__ = ["setlocale","Error","localeconv","strcoll","strxfrm",
"format","str","atof","atoi","LC_CTYPE","LC_COLLATE", "format","str","atof","atoi","LC_CTYPE","LC_COLLATE",
"LC_TIME","LC_MONETARY","LC_NUMERIC","LC_MESSAGES", "LC_TIME","LC_MONETARY","LC_NUMERIC", "LC_ALL","CHAR_MAX"]
"LC_ALL","CHAR_MAX"]
try: try:
...@@ -700,6 +700,13 @@ def _print_locale(): ...@@ -700,6 +700,13 @@ def _print_locale():
### ###
try:
LC_MESSAGES
except:
pass
else:
__all__.append("LC_MESSAGES")
if __name__=='__main__': if __name__=='__main__':
print 'Locale aliasing:' print 'Locale aliasing:'
print print
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment