]> granicus.if.org Git - python/commitdiff
On Mac OS X calling setlocale will raise locale.Error. This isn't fatal,
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 15 Jan 2003 23:43:02 +0000 (23:43 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 15 Jan 2003 23:43:02 +0000 (23:43 +0000)
so just continue testing. Fixes #668787.

Lib/test/test_logging.py

index 1e16def9a7ce5874f8c824439e27b2cda743838b..4e74394ac870607b72d4bcc096e103427a681567 100644 (file)
@@ -31,8 +31,9 @@ import logging, logging.handlers, logging.config
 
 try:
     locale.setlocale(locale.LC_ALL, '')
-except ValueError:
+except (ValueError, locale.Error):
     # this happens on a Solaris box which only supports "C" locale
+    # or a Mac OS X box which supports very little locale stuff at all
     pass
 
 BANNER = "-- %-10s %-6s ---------------------------------------------------\n"