mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-11 17:01:31 +00:00
Don't fail if ubuntu-{main,universe}-sponsors can't be unsubscribed.
This commit is contained in:
parent
315b12484c
commit
f463f63c67
27
ack-sync
27
ack-sync
@ -17,6 +17,7 @@
|
|||||||
# See file /usr/share/common-licenses/GPL-3 for more details.
|
# See file /usr/share/common-licenses/GPL-3 for more details.
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
import lazr.restfulclient
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -149,13 +150,23 @@ def main(bug_numbers, package, version, section, update, verbose=False, silent=F
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
people = launchpad.people
|
succeeded_unsubscribe = True
|
||||||
ums = people['ubuntu-main-sponsors']
|
ums = launchpad.people['ubuntu-main-sponsors']
|
||||||
bug.unsubscribe(person=ums)
|
uus = launchpad.people['ubuntu-universe-sponsors']
|
||||||
uus = people['ubuntu-universe-sponsors']
|
try:
|
||||||
bug.unsubscribe(person=uus)
|
bug.unsubscribe(person=ums)
|
||||||
print "ubuntu-{main,universe}-sponsors unsubscribed (for backward compatibility)"
|
except lazr.restfulclient.errors.HTTPError, http_error:
|
||||||
us = people['ubuntu-sponsors']
|
print "failed to unsubscribe ubuntu-main-sponsors: " + http_error.content
|
||||||
|
succeeded_unsubscribe = False
|
||||||
|
try:
|
||||||
|
bug.unsubscribe(person=uus)
|
||||||
|
except lazr.restfulclient.errors.HTTPError, http_error:
|
||||||
|
print "failed to unsubscribe ubuntu-universe-sponsors: " + http_error.content
|
||||||
|
succeeded_unsubscribe = False
|
||||||
|
if succeeded_unsubscribe:
|
||||||
|
print "ubuntu-{main,universe}-sponsors unsubscribed (for backward compatibility)"
|
||||||
|
|
||||||
|
us = launchpad.people['ubuntu-sponsors']
|
||||||
bug.unsubscribe(person=us)
|
bug.unsubscribe(person=us)
|
||||||
print "ubuntu-sponsors unsubscribed"
|
print "ubuntu-sponsors unsubscribed"
|
||||||
task.transitionToAssignee(assignee=None)
|
task.transitionToAssignee(assignee=None)
|
||||||
@ -170,7 +181,7 @@ def main(bug_numbers, package, version, section, update, verbose=False, silent=F
|
|||||||
else:
|
else:
|
||||||
bug.newMessage(content="package builds, sync request ACK'd")
|
bug.newMessage(content="package builds, sync request ACK'd")
|
||||||
print "Ack comment added"
|
print "Ack comment added"
|
||||||
aa = people['ubuntu-archive']
|
aa = launchpad.people['ubuntu-archive']
|
||||||
bug.subscribe(person=aa)
|
bug.subscribe(person=aa)
|
||||||
print "Archive admin subscribed"
|
print "Archive admin subscribed"
|
||||||
bug.subscribe(person=launchpad.me)
|
bug.subscribe(person=launchpad.me)
|
||||||
|
25
fakesync
25
fakesync
@ -17,6 +17,7 @@
|
|||||||
# See file /usr/share/common-licenses/GPL-3 for more details.
|
# See file /usr/share/common-licenses/GPL-3 for more details.
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
import lazr.restfulclient
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -139,13 +140,23 @@ def main(bug_number, package, version, update, verbose=False, silent=False):
|
|||||||
print task.status
|
print task.status
|
||||||
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
|
||||||
|
|
||||||
people = launchpad.people
|
succeeded_unsubscribe = True
|
||||||
ums = people['ubuntu-main-sponsors']
|
ums = launchpad.people['ubuntu-main-sponsors']
|
||||||
bug.unsubscribe(person=ums)
|
uus = launchpad.people['ubuntu-universe-sponsors']
|
||||||
uus = people['ubuntu-universe-sponsors']
|
try:
|
||||||
bug.unsubscribe(person=uus)
|
bug.unsubscribe(person=ums)
|
||||||
print "ubuntu-{main,universe}-sponsors unsubscribed (for backward compatibility)"
|
except lazr.restfulclient.errors.HTTPError, http_error:
|
||||||
us = people['ubuntu-sponsors']
|
print "failed to unsubscribe ubuntu-main-sponsors: " + http_error.content
|
||||||
|
succeeded_unsubscribe = False
|
||||||
|
try:
|
||||||
|
bug.unsubscribe(person=uus)
|
||||||
|
except lazr.restfulclient.errors.HTTPError, http_error:
|
||||||
|
print "failed to unsubscribe ubuntu-universe-sponsors: " + http_error.content
|
||||||
|
succeeded_unsubscribe = False
|
||||||
|
if succeeded_unsubscribe:
|
||||||
|
print "ubuntu-{main,universe}-sponsors unsubscribed (for backward compatibility)"
|
||||||
|
|
||||||
|
us = launchpad.people['ubuntu-sponsors']
|
||||||
bug.unsubscribe(person=us)
|
bug.unsubscribe(person=us)
|
||||||
print "ubuntu-sponsors unsubscribed"
|
print "ubuntu-sponsors unsubscribed"
|
||||||
task.transitionToAssignee(assignee=None)
|
task.transitionToAssignee(assignee=None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user