Author: andar
Revision: 6055
Log:
Fix exceptions when gettext/locale cannot be initialized properly
Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-12-21 19:04:15 UTC (rev 6054)
+++ branches/1.2_RC/ChangeLog 2009-12-21 19:41:31 UTC (rev 6055)
@@ -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
Modified: branches/1.2_RC/deluge/core/daemon.py
===================================================================
--- branches/1.2_RC/deluge/core/daemon.py 2009-12-21 19:04:15 UTC (rev
6054)
+++ branches/1.2_RC/deluge/core/daemon.py 2009-12-21 19:41:31 UTC (rev
6055)
@@ -105,6 +105,8 @@
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.
Modified: trunk/deluge/core/daemon.py
===================================================================
--- trunk/deluge/core/daemon.py 2009-12-21 19:04:15 UTC (rev 6054)
+++ trunk/deluge/core/daemon.py 2009-12-21 19:41:31 UTC (rev 6055)
@@ -105,6 +105,8 @@
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.
--
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en.