]> granicus.if.org Git - python/commitdiff
At least one Solaris box in the snake farm only supports "C" locale.
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 5 Jan 2003 18:15:23 +0000 (18:15 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 5 Jan 2003 18:15:23 +0000 (18:15 +0000)
Adding try/except allows the test to pass

Lib/test/test_logging.py

index 360d3ac225487c75455d4ba342670e6f78073064..1e16def9a7ce5874f8c824439e27b2cda743838b 100644 (file)
@@ -29,7 +29,11 @@ import os, sys, string, struct, types, cPickle, cStringIO
 import socket, threading, time, locale
 import logging, logging.handlers, logging.config
 
-locale.setlocale(locale.LC_ALL, '')
+try:
+    locale.setlocale(locale.LC_ALL, '')
+except ValueError:
+    # this happens on a Solaris box which only supports "C" locale
+    pass
 
 BANNER = "-- %-10s %-6s ---------------------------------------------------\n"