Fix exceptions when gettext/locale cannot be initialized properly
This commit is contained in:
parent
e0ebffb8fa
commit
cd3221baf6
|
@ -105,6 +105,8 @@ class Daemon(object):
|
||||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.error("Unable to initialize gettext/locale: %s", e)
|
log.error("Unable to initialize gettext/locale: %s", e)
|
||||||
|
import __builtin__
|
||||||
|
__builtin__.__dict__["_"] = lambda x: x
|
||||||
|
|
||||||
# Twisted catches signals to terminate, so just have it call the shutdown
|
# Twisted catches signals to terminate, so just have it call the shutdown
|
||||||
# method.
|
# method.
|
||||||
|
|
Loading…
Reference in New Issue