diff options
author | Andrew Resch <andrewresch@gmail.com> | 2009-12-21 19:41:31 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2009-12-21 19:41:31 +0000 |
commit | 6a8e023ffd7eb631f6b586bf11296398c4a41063 (patch) | |
tree | 19be76b33210e5a36f0a3c34e8840194e3793593 | |
parent | 6b396f1f77143a252b3edd5d9f61f489e113a6ce (diff) | |
download | deluge-6a8e023ffd7eb631f6b586bf11296398c4a41063.tar.gz deluge-6a8e023ffd7eb631f6b586bf11296398c4a41063.tar.bz2 deluge-6a8e023ffd7eb631f6b586bf11296398c4a41063.zip |
Fix exceptions when gettext/locale cannot be initialized properly
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | deluge/core/daemon.py | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,7 @@ ==== Core ==== * Fix file renaming * Fix tracker host filtering (Closes #1106) + * Fix exceptions when gettext/locale cannot be initialized properly ==== GtkUI ==== * Fix #1104, #735 use path.utf-8 if available diff --git a/deluge/core/daemon.py b/deluge/core/daemon.py index 90bfb79b0..a943ac71d 100644 --- a/deluge/core/daemon.py +++ b/deluge/core/daemon.py @@ -105,6 +105,8 @@ class Daemon(object): gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n")) except Exception, 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 # method. |