From: Zooko O'Whielacronx Date: Fri, 15 Oct 2010 05:44:40 +0000 (-0700) Subject: setup: catch and log ValueError from locale.getdefaultlocale() in show-tool-versions.py X-Git-Tag: trac-4800~43 X-Git-Url: https://git.rkrishnan.org/maximilian?a=commitdiff_plain;h=5c31a7079b0e9681872621f27d14339441bc8188;p=tahoe-lafs%2Ftahoe-lafs.git setup: catch and log ValueError from locale.getdefaultlocale() in show-tool-versions.py I got a bug report from Mathias Baert showing that locale.getdefaultlocale() raises an exception on his Mac OS X system. Heh. --- diff --git a/misc/build_helpers/show-tool-versions.py b/misc/build_helpers/show-tool-versions.py index 19d21084..45b1645b 100644 --- a/misc/build_helpers/show-tool-versions.py +++ b/misc/build_helpers/show-tool-versions.py @@ -31,7 +31,10 @@ def print_python_encoding_settings(): print 'filesystem.encoding: ' + str(sys.getfilesystemencoding()) print 'locale.getpreferredencoding: ' + str(locale.getpreferredencoding()) print 'os.path.supports_unicode_filenames: ' + str(os.path.supports_unicode_filenames) - print 'locale.defaultlocale: ' + str(locale.getdefaultlocale()) + try: + print 'locale.defaultlocale: ' + str(locale.getdefaultlocale()) + except ValueError, e: + print 'got exception from locale.getdefaultlocale(): ', e print 'locale.locale: ' + str(locale.getlocale()) def print_stdout(cmdlist, label=None):