[infer][PR] Fix ValueError: unknown locale: UTF-8

Summary:
Fix locale.getlocale throw ValueError exception, but not catch.
Related issues: #447 #445 #358
Closes https://github.com/facebook/infer/pull/630

Differential Revision: D4834267

Pulled By: jvillard

fbshipit-source-id: c66386b
master
htxs 8 years ago committed by Facebook Github Bot
parent 9a9dec4d96
commit 4933a22991

@ -17,7 +17,7 @@ import os
try:
locale.setlocale(locale.LC_ALL, '')
CODESET = locale.getlocale(locale.LC_CTYPE)[1]
except locale.Error:
except:
CODESET = None
if CODESET is None:
CODESET = 'ascii'

Loading…
Cancel
Save