← Back to team overview

ubuntu-bots team mailing list archive

[Merge] lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology

 

Thomas Molloy has proposed merging lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.

Requested reviews:
  Ubuntu IRC Bots (ubuntu-bots)

For more details, see:
https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/205384

fix for the vote output
-- 
https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/205384
Your team Ubuntu IRC Bots is requested to review the proposed merge of lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.
=== modified file 'writers.py'
--- writers.py	2013-11-19 23:51:36 +0000
+++ writers.py	2014-02-07 15:24:49 +0000
@@ -1215,19 +1215,20 @@
         Votes = [ ]
         Votes.append(self.heading('Vote results'))
         # reversed to show the oldest first
-        for m in reversed(M.votes):
-            # differentiate denied votes somehow, strikethrough perhaps?
-            Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
-            motion = "Deadlock"
-            if(M.votes[m][0] > M.votes[m][1]):
-                motion = "Motion carried"
-            elif(M.votes[m][0] < M.votes[m][2]):
-                motion = "Motion denied"
-            
-            Votes.append("  * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
-            if len(M.publicVoters[m]) > 0:
-                publicVoters = ', '.join(set(M.publicVoters[m]))
-                Votes.append("   *  Voters " + publicVoters)
+        if len(M.votes) > 0:
+            for m in reversed(M.votes):
+                # differentiate denied votes somehow, strikethrough perhaps?
+                Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
+                motion = "Deadlock"
+                if(M.votes[m][0] > M.votes[m][1]):
+                    motion = "Motion carried"
+                elif(M.votes[m][0] < M.votes[m][2]):
+                    motion = "Motion denied"
+                
+                Votes.append("  * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
+                if len(M.publicVoters[m]) > 0:
+                    publicVoters = ', '.join(set(M.publicVoters[m]))
+                    Votes.append("   *  Voters " + publicVoters)
         Votes = "\n".join(Votes) 
         return Votes
 


Follow ups