diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-24 10:13:46 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-24 10:13:46 (GMT) |
commit | 1baf829835adc795203179fc84256a6a7ca6202d (patch) | |
tree | bb758aeafeeb217a7d6c1bbd38ab559ab939b75c /Lib | |
parent | 19f52c2e346b0dde40067d733e69c6abda1de9a0 (diff) | |
download | cpython-1baf829835adc795203179fc84256a6a7ca6202d.zip cpython-1baf829835adc795203179fc84256a6a7ca6202d.tar.gz cpython-1baf829835adc795203179fc84256a6a7ca6202d.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/locale.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Lib/locale.py b/Lib/locale.py index 24e4c0e..7a515f4 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -16,12 +16,12 @@ import string, sys # Try importing the _locale module. # # 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", "format","str","atof","atoi","LC_CTYPE","LC_COLLATE", - "LC_TIME","LC_MONETARY","LC_NUMERIC","LC_MESSAGES", - "LC_ALL","CHAR_MAX"] + "LC_TIME","LC_MONETARY","LC_NUMERIC", "LC_ALL","CHAR_MAX"] try: @@ -700,6 +700,13 @@ def _print_locale(): ### +try: + LC_MESSAGES +except: + pass +else: + __all__.append("LC_MESSAGES") + if __name__=='__main__': print 'Locale aliasing:' print |