* requestsync: Skip existing bug check if no credentials are

found (LP: #318120).
This commit is contained in:
Jonathan Davies 2009-01-17 14:33:29 +00:00
parent e61194f9a0
commit d1ec836e76
2 changed files with 12 additions and 6 deletions

3
debian/changelog vendored
View File

@ -1,6 +1,7 @@
ubuntu-dev-tools (0.57) UNRELEASED; urgency=low
* Changes go here.
* requestsync: Skip existing bug check if no credentials are
found (LP: #318120).
-- Jonathan Davies <jpds@ubuntu.com> Sat, 17 Jan 2009 11:41:22 +0000

View File

@ -95,19 +95,24 @@ def checkExistingReports(package):
If found ask for confirmation on filing a request.
"""
launchpad = None
try:
launchpad = common.get_launchpad("ubuntu-dev-tools")
except ImportError:
print >> sys.stderr, 'Importing launchpadlib failed. Is ' \
'python-launchpadlib installed?'
print >> sys.stderr, "Skipping existing report check, you should "\
"manually check at:"
print "- https://bugs.launchpad.net/ubuntu/+source/%s" % package
return False
except IOError, msg:
# No credentials found.
print msg
sys.exit(1)
# Failed to get Launchpad credentials.
if launchpad is None:
print >> sys.stderr, "Skipping existing report check, you should "\
"manually see if there are any at:"
print "- https://bugs.launchpad.net/ubuntu/+source/%s" % package
print ""
return False
# Fetch the package's bug list from Launchpad.
pkg = launchpad.distributions["ubuntu"].getSourcePackage(name=package)