/soc/2012/sanket/www-statscollector: e19b008252d3: [BUG FIX] Add...
Sanket Agarwal
sanket at soc.pidgin.im
Tue Jul 10 02:13:35 EDT 2012
Changeset: e19b008252d38039522779916838a9753dd0ee39
Author: Sanket Agarwal <sanket at soc.pidgin.im>
Date: 2012-07-10 11:15 +0530
Branch: default
URL: http://hg.pidgin.im/soc/2012/sanket/www-statscollector/rev/e19b008252d3
Description:
[BUG FIX] Additional guards to avoid NULL values from entering Account
Account.service requires a non NULL value, and the current guards were
not ensuring as empty string was able to pass as not null but in the db
showed as NULL.
diffstat:
pidgin_stats_collector/statscollector/process.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (22 lines):
diff --git a/pidgin_stats_collector/statscollector/process.py b/pidgin_stats_collector/statscollector/process.py
--- a/pidgin_stats_collector/statscollector/process.py
+++ b/pidgin_stats_collector/statscollector/process.py
@@ -127,13 +127,13 @@
irc_server = prpl_plugin.xpath('Server')[0].text.strip()
except: pass
print prpl_name, irc_server, jabber_connect, jabber_domain
- pdb.set_trace()
if prpl_name == 'prpl-jabber':
- if jabber_connect: acc.service = jabber_connect
- elif jabber_domain: acc.service = jabber_domain
-
- elif prpl_name == 'prpl-irc':
+ if jabber_connect and jabber_connect != "":
+ acc.service = jabber_connect
+ elif jabber_domain and jabber_domain != "":
+ acc.service = jabber_domain
+ elif prpl_name == 'prpl-irc' and irc_server and irc_server != "":
acc.service = irc_server
acc.prpl_name = prpl_name
More information about the Commits
mailing list