[gnome-continuous] bot: Don't throw an error on initial query



commit b0d152ee9b7356a13e263415d9d1b96f3419ca34
Author: Colin Walters <walters verbum org>
Date:   Sun Sep 29 17:22:46 2013 -0400

    bot: Don't throw an error on initial query

 extras/ircbot/bot.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/extras/ircbot/bot.py b/extras/ircbot/bot.py
index adfc0e3..74638db 100644
--- a/extras/ircbot/bot.py
+++ b/extras/ircbot/bot.py
@@ -154,7 +154,10 @@ class BuildGnomeOrg(irc.IRCClient):
             return
 
         (last_state, new_state, status_msg) = querystate
-        last_success = last_state['success']
+        if last_state is not None:
+            last_success = last_state['success']
+        else:
+            last_state = True
         success = new_state['success']
         success_changed = last_success != success
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]