sponsor-patch: Check permission to unsubscribe sponsors-team (LP: #896884)

This commit is contained in:
Stefano Rivera 2011-11-27 21:02:48 +02:00
commit ea962ee2ac
2 changed files with 14 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,5 +1,6 @@
ubuntu-dev-tools (0.137) UNRELEASED; urgency=low
[ Stefano Rivera ]
* mk-sbuild: Make --eatmydata command line flag actually work.
* Remove dgetlp. No longer needed.
* Use httplib2 everywhere that we do https. The python stdlib doesn't do
@ -15,7 +16,10 @@ ubuntu-dev-tools (0.137) UNRELEASED; urgency=low
* sponsor-patch: Check the bug's title, not the task, when determining
source series for syncs.
-- Stefano Rivera <stefanor@debian.org> Mon, 21 Nov 2011 09:47:00 +0200
[ Andreas Moog ]
* sponsor-patch: Check permission to unsubscribe sponsors-team (LP: #896884)
-- Andreas Moog <amoog@ubuntu.com> Sun, 27 Nov 2011 16:47:05 +0100
ubuntu-dev-tools (0.136) unstable; urgency=low

View File

@ -99,8 +99,15 @@ class SourcePackage(object):
bug.subscribe(person=launchpad.me)
Logger.info("Subscribed me to bug #%i.", bug.id)
bug.unsubscribe(person=launchpad.people['ubuntu-sponsors'])
Logger.info("Unsubscribed ubuntu-sponsors from bug #%i.", bug.id)
sponsorsteam = launchpad.people['ubuntu-sponsors']
for sub in bug.subscriptions:
if sub.person == sponsorsteam and sub.canBeUnsubscribedByUser():
bug.unsubscribe(person=launchpad.people['ubuntu-sponsors'])
Logger.info("Unsubscribed ubuntu-sponsors from bug #%i.",
bug.id)
elif sub.person == sponsorsteam:
Logger.info("Couldn't unsubscribe ubuntu-sponsors from "
"bug #%i.", bug.id)
Logger.normal("Successfully acknowledged sync request bug #%i.",
bug.id)