Merge lp:~cjwatson/ols-jenkaas/ignore-hidden-votes into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Colin Watson
Status: Merged
Merged at revision: 625
Proposed branch: lp:~cjwatson/ols-jenkaas/ignore-hidden-votes
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 24 lines (+6/-1)
1 file modified
olsjenkaas/launchpad.py (+6/-1)
To merge this branch: bzr merge lp:~cjwatson/ols-jenkaas/ignore-hidden-votes
Reviewer Review Type Date Requested Status
Adam Collard (community) Approve
Review via email: mp+358681@code.launchpad.net

Commit message

Ignore hidden votes on merge proposals.

Description of the change

This otherwise greatly confused ols-jenkaas (e.g. https://jenkins.ols.canonical.com/online-services/job/software-center-agent-junit/606/console; I worked around that by unhiding the relevant vote comment on the MP).

To post a comment you must log in.
Revision history for this message
Adam Collard (adam-collard) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'olsjenkaas/launchpad.py'
--- olsjenkaas/launchpad.py 2017-02-07 13:46:30 +0000
+++ olsjenkaas/launchpad.py 2018-11-13 03:04:20 +0000
@@ -16,6 +16,7 @@
1616
17from launchpadlib import (17from launchpadlib import (
18 credentials,18 credentials,
19 errors,
19 launchpad,20 launchpad,
20)21)
2122
@@ -87,7 +88,11 @@
87 if vote.is_pending:88 if vote.is_pending:
88 votes[u'Pending'] += 189 votes[u'Pending'] += 1
89 else:90 else:
90 comment = vote.comment91 try:
92 comment = vote.comment
93 except errors.NotFound:
94 # Ignore hidden votes
95 continue
91 if comment is not None and comment.vote != u'Abstain':96 if comment is not None and comment.vote != u'Abstain':
92 votes[comment.vote] += 197 votes[comment.vote] += 1
93 approved = False98 approved = False

Subscribers

People subscribed via source and target branches