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

Proposed by Thomas Molloy
Status: Merged
Merged at revision: 17
Proposed branch: lp:~lderan/ubuntu-bots/meeetingology-output
Merge into: lp:~ubuntu-bots/ubuntu-bots/meetingology
Diff against target: 36 lines (+14/-13)
1 file modified
writers.py (+14/-13)
To merge this branch: bzr merge lp:~lderan/ubuntu-bots/meeetingology-output
Reviewer Review Type Date Requested Status
Alan Bell Approve
Review via email: mp+205384@code.launchpad.net

Description of the change

fix for the vote output

To post a comment you must log in.
Revision history for this message
Alan Bell (alanbell) :
review: Approve
17. By Alan Bell

accept fix of vote output

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'writers.py'
2--- writers.py 2013-11-19 23:51:36 +0000
3+++ writers.py 2014-02-07 15:24:49 +0000
4@@ -1215,19 +1215,20 @@
5 Votes = [ ]
6 Votes.append(self.heading('Vote results'))
7 # reversed to show the oldest first
8- for m in reversed(M.votes):
9- # differentiate denied votes somehow, strikethrough perhaps?
10- Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
11- motion = "Deadlock"
12- if(M.votes[m][0] > M.votes[m][1]):
13- motion = "Motion carried"
14- elif(M.votes[m][0] < M.votes[m][2]):
15- motion = "Motion denied"
16-
17- Votes.append(" * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
18- if len(M.publicVoters[m]) > 0:
19- publicVoters = ', '.join(set(M.publicVoters[m]))
20- Votes.append(" * Voters " + publicVoters)
21+ if len(M.votes) > 0:
22+ for m in reversed(M.votes):
23+ # differentiate denied votes somehow, strikethrough perhaps?
24+ Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
25+ motion = "Deadlock"
26+ if(M.votes[m][0] > M.votes[m][1]):
27+ motion = "Motion carried"
28+ elif(M.votes[m][0] < M.votes[m][2]):
29+ motion = "Motion denied"
30+
31+ Votes.append(" * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
32+ if len(M.publicVoters[m]) > 0:
33+ publicVoters = ', '.join(set(M.publicVoters[m]))
34+ Votes.append(" * Voters " + publicVoters)
35 Votes = "\n".join(Votes)
36 return Votes
37

Subscribers

People subscribed via source and target branches