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

This commit is contained in:
Andreas Moog 2011-11-27 15:54:53 +01:00
parent d30ffe59bc
commit 7ed4347de5
2 changed files with 10 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
@ -11,7 +12,10 @@ ubuntu-dev-tools (0.137) UNRELEASED; urgency=low
non-backports pocket. Implemented by making lpapicache's getSourcePackage
smarter.
-- 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 15:54:10 +0100
ubuntu-dev-tools (0.136) unstable; urgency=low

View File

@ -99,8 +99,11 @@ 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)
if launchpad.load('https://api.launchpad.net/1.0/bugs/'+str(bug.id)+'/+subscription/ubuntu-sponsors').canBeUnsubscribedByUser()
bug.unsubscribe(person=launchpad.people['ubuntu-sponsors'])
Logger.info("Unsubscribed ubuntu-sponsors from bug #%i.", bug.id)
else:
Logger.info("Couldn't unsubscribe ubuntu-sponsors from bug #%i.", bug.id)
Logger.normal("Successfully acknowledged sync request bug #%i.",
bug.id)