← 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/205402

Fix for the meetingbot
-- 
https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/205402
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 'items.py'
--- items.py	2014-02-07 14:51:56 +0000
+++ items.py	2014-02-07 16:14:25 +0000
@@ -187,10 +187,6 @@
     def __init__(self, nick, line, linenum, time_):
         self.nick = nick ; self.line = line ; self.linenum = linenum
         self.time = time.strftime("%H:%M", time_)
-    def __init__(self, nick, line, linenum):
-        time_ = time.localtime()
-        self.nick = nick ; self.line = line ; self.linenum = linenum
-        self.time = time.strftime("%H:%M", time_)
     def _htmlrepl(self, M):
         repl = self.get_replacements(M, escapewith=writers.html)
         repl['link'] = self.logURL(M)

=== modified file 'meeting.py'
--- meeting.py	2013-11-19 23:47:26 +0000
+++ meeting.py	2014-02-07 16:14:25 +0000
@@ -299,7 +299,9 @@
         if not self.isChair(nick): return
         #close any open votes
         if not self.activeVote=="":
-            self.do_endvote(nick, line, **kwargs)
+            endVoteKwargs = {"linenum": kwargs.get('linenum',"0"),
+                 "time_": time.localtime()}
+            self.do_endvote(nick, line, **endVoteKwargs)
         if self.oldtopic:
             self.topic(self.oldtopic)
         self.endtime = time_

=== modified file 'writers.py'
--- writers.py	2014-02-07 15:24:05 +0000
+++ writers.py	2014-02-07 16:14:25 +0000
@@ -1216,7 +1216,7 @@
         Votes.append(self.heading('Vote results'))
         # reversed to show the oldest first
         if len(M.votes) > 0:
-            for m in reversed(M.votes):
+            for m in M.votes:
                 # differentiate denied votes somehow, strikethrough perhaps?
                 Votes.append(" * [[%(fullLogsFullURL)s#"+str(M.votes[m][3])+" "+m+"]]")
                 motion = "Deadlock"
@@ -1224,8 +1224,7 @@
                     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]) + ")")
+                Votes.insert(0,"  * " + 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)


Follow ups