mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Fix SYS_ENCODING should still be set if locale.setlocale fails (like it does on Windows)
This commit is contained in:
parent
d3736c1df5
commit
80fe5327df
1 changed files with 3 additions and 0 deletions
|
@ -129,6 +129,9 @@ class SickRage(object):
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "UTF-8")
|
locale.setlocale(locale.LC_ALL, "UTF-8")
|
||||||
locale.setlocale(locale.LC_CTYPE, "UTF-8")
|
locale.setlocale(locale.LC_CTYPE, "UTF-8")
|
||||||
|
except (locale.Error, IOError):
|
||||||
|
pass
|
||||||
|
try:
|
||||||
sickbeard.SYS_ENCODING = locale.getpreferredencoding()
|
sickbeard.SYS_ENCODING = locale.getpreferredencoding()
|
||||||
except (locale.Error, IOError):
|
except (locale.Error, IOError):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue