Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 502b9e1

Browse files
committed
At least one Solaris box in the snake farm only supports "C" locale.
Adding try/except allows the test to pass
1 parent 3dd990c commit 502b9e1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_logging.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
import socket, threading, time, locale
3030
import logging, logging.handlers, logging.config
3131

32-
locale.setlocale(locale.LC_ALL, '')
32+
try:
33+
locale.setlocale(locale.LC_ALL, '')
34+
except ValueError:
35+
# this happens on a Solaris box which only supports "C" locale
36+
pass
3337

3438
BANNER = "-- %-10s %-6s ---------------------------------------------------\n"
3539

0 commit comments

Comments
 (0)