mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-05 05:51:29 +00:00
Also modify grab-attachments, hugdaylist, update-maintainer to bail on no creds
This commit is contained in:
parent
6db05720f3
commit
1973bde3e0
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -7,10 +7,11 @@ ubuntu-dev-tools (0.83) UNRELEASED; urgency=low
|
|||||||
default release if we aren't using it. (LP: #477670)
|
default release if we aren't using it. (LP: #477670)
|
||||||
* pull-lp-source: Detect more failure conditions and give a nice error
|
* pull-lp-source: Detect more failure conditions and give a nice error
|
||||||
instead of a trace
|
instead of a trace
|
||||||
* buildd, requestsync: Detect & bail if we don't have credentials and need
|
* buildd, requestsync, grab-attachments, hugdaylist, update-maintainer:
|
||||||
them. These scripts cannot continue under those circumstances.
|
Detect & bail if we don't have credentials and need them. These scripts
|
||||||
|
cannot continue under those circumstances.
|
||||||
|
|
||||||
-- Iain Lane <laney@ubuntu.com> Sat, 07 Nov 2009 19:18:27 +0000
|
-- Iain Lane <laney@ubuntu.com> Sat, 07 Nov 2009 19:34:25 +0000
|
||||||
|
|
||||||
ubuntu-dev-tools (0.82) lucid; urgency=low
|
ubuntu-dev-tools (0.82) lucid; urgency=low
|
||||||
|
|
||||||
|
@ -33,23 +33,30 @@ def main():
|
|||||||
print USAGE
|
print USAGE
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
launchpad = get_launchpad("ubuntu-dev-tools")
|
try:
|
||||||
for arg in sys.argv[1:]:
|
launchpad = get_launchpad("ubuntu-dev-tools")
|
||||||
try:
|
|
||||||
number = int(arg)
|
|
||||||
except:
|
|
||||||
print >> sys.stderr, "'%s' is not a valid bug number." % arg
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
b = launchpad.bugs[number]
|
for arg in sys.argv[1:]:
|
||||||
|
try:
|
||||||
for a in b.attachments:
|
number = int(arg)
|
||||||
f = a.data.open()
|
except:
|
||||||
filename = os.path.join(os.getcwd(), f.filename)
|
print >> sys.stderr, "'%s' is not a valid bug number." % arg
|
||||||
local_file = open(filename, "w")
|
sys.exit(1)
|
||||||
local_file.write(f.read())
|
|
||||||
f.close()
|
b = launchpad.bugs[number]
|
||||||
local_file.close()
|
|
||||||
|
for a in b.attachments:
|
||||||
|
f = a.data.open()
|
||||||
|
filename = os.path.join(os.getcwd(), f.filename)
|
||||||
|
local_file = open(filename, "w")
|
||||||
|
local_file.write(f.read())
|
||||||
|
f.close()
|
||||||
|
local_file.close()
|
||||||
|
|
||||||
|
# no LP credentials
|
||||||
|
except IOError, e:
|
||||||
|
print e
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -88,7 +88,13 @@ def main():
|
|||||||
print >> sys.stderr, "Options in url are not supported, url: %s" %url
|
print >> sys.stderr, "Options in url are not supported, url: %s" %url
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
launchpad = get_launchpad("ubuntu-dev-tools")
|
launchpad = None
|
||||||
|
try:
|
||||||
|
launchpad = get_launchpad("ubuntu-dev-tools")
|
||||||
|
except IOError, e:
|
||||||
|
print e
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
api_url = translate_web_api(url, launchpad)
|
api_url = translate_web_api(url, launchpad)
|
||||||
try:
|
try:
|
||||||
product = launchpad.load(api_url)
|
product = launchpad.load(api_url)
|
||||||
|
@ -31,6 +31,12 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import ubuntutools.packages
|
import ubuntutools.packages
|
||||||
|
|
||||||
|
# Cannot work without LP credentials
|
||||||
|
try:
|
||||||
|
Launchpad.login()
|
||||||
|
except IOError:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
valid_locations = ["debian/control.in", "control.in", "debian/control", "control"]
|
valid_locations = ["debian/control.in", "control.in", "debian/control", "control"]
|
||||||
control_file_found = False
|
control_file_found = False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user