changeset 2481:4030f9321319

Fix local variable reference prior to assignment.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Fri, 20 Jul 2007 23:57:03 +0200
parents b0185066e802
children 33eb7652cc0a
files jabberbot/xmlrpcbot.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/xmlrpcbot.py	Fri Jul 20 23:08:12 2007 +0200
+++ b/jabberbot/xmlrpcbot.py	Fri Jul 20 23:57:03 2007 +0200
@@ -228,6 +228,8 @@
         """Returns language of the a user identified by the given JID"""
 
         server = xmlrpclib.ServerProxy(self.config.wiki_url + "?action=xmlrpc2")
+        language = "en"
+        
         try:
             language = server.getUserLanguageByJID(command.jid)
         except xmlrpclib.Fault, fault:
@@ -237,7 +239,7 @@
         except Exception, exc:
             self.log.critical(str(exc))
 
-        command.language = language or "en"
+        command.language = language
         self.commands_out.put_nowait(command)