1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix SYS_ENCODING should still be set if locale.setlocale fails (like it does on Windows)

This commit is contained in:
Prinz23 2014-11-06 15:59:33 +01:00
parent d3736c1df5
commit 80fe5327df

View File

@ -129,6 +129,9 @@ class SickRage(object):
try:
locale.setlocale(locale.LC_ALL, "UTF-8")
locale.setlocale(locale.LC_CTYPE, "UTF-8")
except (locale.Error, IOError):
pass
try:
sickbeard.SYS_ENCODING = locale.getpreferredencoding()
except (locale.Error, IOError):
pass