Catch exception when can not get a default locale

This commit is contained in:
Ivan Kravets
2019-11-13 16:48:04 +02:00
parent 053160a6eb
commit 728fd7f5b9

View File

@ -32,7 +32,10 @@ def get_filesystem_encoding():
def get_locale_encoding():
return locale.getdefaultlocale()[1]
try:
return locale.getdefaultlocale()[1]
except ValueError:
return None
def get_class_attributes(cls):