mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-13 11:48:40 +00:00
Fix exceptions when gettext/locale cannot be initialized properly
This commit is contained in:
parent
6b396f1f77
commit
6a8e023ffd
2 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
==== Core ====
|
==== Core ====
|
||||||
* Fix file renaming
|
* Fix file renaming
|
||||||
* Fix tracker host filtering (Closes #1106)
|
* Fix tracker host filtering (Closes #1106)
|
||||||
|
* Fix exceptions when gettext/locale cannot be initialized properly
|
||||||
|
|
||||||
==== GtkUI ====
|
==== GtkUI ====
|
||||||
* Fix #1104, #735 use path.utf-8 if available
|
* Fix #1104, #735 use path.utf-8 if available
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue