[gnome-continuous] Revert "bot: Notify in case of failure, not just success"



commit 06c85cb2dd141967800b54330086724d1c063455
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Apr 27 11:15:52 2017 +0100

    Revert "bot: Notify in case of failure, not just success"
    
    This reverts commit 994c0af36d3d1c81c9770ac4b33c4b64bebdc864.
    
    It seems this change is breaking the bot more often than not, but
    Supybot leaves no trace, so let's revert it.

 extras/ircbot/bot.py |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/extras/ircbot/bot.py b/extras/ircbot/bot.py
index 4a0662e..834854e 100644
--- a/extras/ircbot/bot.py
+++ b/extras/ircbot/bot.py
@@ -157,7 +157,7 @@ class BuildGnomeOrg(irc.IRCClient):
 
         return msg
 
-    def _get_channels_for_changed_components(self, taskname, success):
+    def _get_channels_for_changed_components(self, taskname):
         current_task_path = os.path.join(self._workdir, 'results/tasks/%s/%s/' % (taskname, taskname))
         build_path = os.path.join(current_task_path, 'build.json')
         if not os.path.exists(build_path):
@@ -170,10 +170,7 @@ class BuildGnomeOrg(irc.IRCClient):
         if 'built' not in build.keys():
             return []
 
-        if success:
-            component_names = [x['name'] for x in build['built'] if 'name' in x.keys()]
-        else:
-            component_names = [x['name'] for x in build['failed'] if 'name' in x.keys()]
+        component_names = [x['name'] for x in build['built'] if 'name' in x.keys()]
 
         snapshot_path = os.path.join(current_task_path, 'snapshot.json')
         if not os.path.exists(snapshot_path):
@@ -206,7 +203,7 @@ class BuildGnomeOrg(irc.IRCClient):
 
         msg = self._status_line_for_task(taskname)
 
-        affected_channels = self._get_channels_for_changed_components(taskname, success)
+        affected_channels = self._get_channels_for_changed_components(taskname)
 
         if announce_always or success_changed:
             self._sendTo(self._flood_channels, msg)


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