Don't die if setting C locale fails

This commit is contained in:
Kovid Goyal 2008-04-12 09:16:14 +05:30
parent e55835dd63
commit 1d0fcc05f8

View File

@ -26,7 +26,10 @@ iswindows = 'win32' in sys.platform.lower() or 'win64' in sys.platform.lower()
isosx = 'darwin' in sys.platform.lower()
islinux = not(iswindows or isosx)
try:
locale.setlocale(locale.LC_ALL, '')
except:
pass
def osx_version():
if isosx: