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

Proposed by Thomas Molloy
Status: Merged
Merged at revision: 18
Proposed branch: lp:~lderan/ubuntu-bots/meeetingology-output
Merge into: lp:~ubuntu-bots/ubuntu-bots/meetingology
Diff against target: 52 lines (+5/-8)
3 files modified
items.py (+0/-4)
meeting.py (+3/-1)
writers.py (+2/-3)
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+205402@code.launchpad.net

Description of the change

Fix for the meetingbot

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

remove vote reversing

review: Approve
18. By Alan Bell

accepting merge for fixing voting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'items.py'
2--- items.py 2014-02-07 14:51:56 +0000
3+++ items.py 2014-02-07 16:14:25 +0000
4@@ -187,10 +187,6 @@
5 def __init__(self, nick, line, linenum, time_):
6 self.nick = nick ; self.line = line ; self.linenum = linenum
7 self.time = time.strftime("%H:%M", time_)
8- def __init__(self, nick, line, linenum):
9- time_ = time.localtime()
10- self.nick = nick ; self.line = line ; self.linenum = linenum
11- self.time = time.strftime("%H:%M", time_)
12 def _htmlrepl(self, M):
13 repl = self.get_replacements(M, escapewith=writers.html)
14 repl['link'] = self.logURL(M)
15
16=== modified file 'meeting.py'
17--- meeting.py 2013-11-19 23:47:26 +0000
18+++ meeting.py 2014-02-07 16:14:25 +0000
19@@ -299,7 +299,9 @@
20 if not self.isChair(nick): return
21 #close any open votes
22 if not self.activeVote=="":
23- self.do_endvote(nick, line, **kwargs)
24+ endVoteKwargs = {"linenum": kwargs.get('linenum',"0"),
25+ "time_": time.localtime()}
26+ self.do_endvote(nick, line, **endVoteKwargs)
27 if self.oldtopic:
28 self.topic(self.oldtopic)
29 self.endtime = time_
30
31=== modified file 'writers.py'
32--- writers.py 2014-02-07 15:24:05 +0000
33+++ writers.py 2014-02-07 16:14:25 +0000
34@@ -1216,7 +1216,7 @@
35 Votes.append(self.heading('Vote results'))
36 # reversed to show the oldest first
37 if len(M.votes) > 0:
38- for m in reversed(M.votes):
39+ for m in M.votes:
40 # differentiate denied votes somehow, strikethrough perhaps?
41 Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
42 motion = "Deadlock"
43@@ -1224,8 +1224,7 @@
44 motion = "Motion carried"
45 elif(M.votes[m][0] < M.votes[m][2]):
46 motion = "Motion denied"
47-
48- Votes.append(" * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
49+ Votes.insert(0," * " + motion + " (For/Against/Abstained "+str(M.votes[m][0])+"/"+str(M.votes[m][2])+"/"+str(M.votes[m][1]) + ")")
50 if len(M.publicVoters[m]) > 0:
51 publicVoters = ', '.join(set(M.publicVoters[m]))
52 Votes.append(" * Voters " + publicVoters)

Subscribers

People subscribed via source and target branches