mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
* requestsync: Catch credentials error to hide traceback.
This commit is contained in:
parent
dce63c4fb7
commit
152220567d
@ -290,6 +290,7 @@ def find_credentials(consumer, files, level=None):
|
||||
continue
|
||||
if cred.consumer.key == consumer:
|
||||
return cred
|
||||
|
||||
raise IOError("No credentials found for '%s', please see the " \
|
||||
"manage-credentials manpage for help on how to create " \
|
||||
"one for this consumer." % consumer)
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -4,6 +4,7 @@ ubuntu-dev-tools (0.56) UNRELEASED; urgency=low
|
||||
folder world unreadable.
|
||||
* common.py: Improved no credentials found error message to show which
|
||||
consumer token is needed.
|
||||
* requestsync: Catch credentials error to hide traceback.
|
||||
|
||||
-- Jonathan Davies <jpds@ubuntu.com> Thu, 15 Jan 2009 12:35:12 +0000
|
||||
|
||||
|
@ -104,6 +104,10 @@ def checkExistingReports(package):
|
||||
"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)
|
||||
|
||||
# Fetch the package's bug list from Launchpad.
|
||||
pkg = launchpad.distributions["ubuntu"].getSourcePackage(name=package)
|
||||
@ -343,6 +347,10 @@ def post_bug(source_package, subscribe, status, bugtitle, bugtext):
|
||||
except ImportError:
|
||||
print >> sys.stderr, 'Importing launchpadlib failed. Is python-launchpadlib installed?'
|
||||
return False
|
||||
except IOError, msg:
|
||||
# No credentials found.
|
||||
print msg
|
||||
sys.exit(1)
|
||||
|
||||
if source_package:
|
||||
product_url = "%subuntu/+source/%s" %(launchpad._root_uri, source_package)
|
||||
|
Loading…
x
Reference in New Issue
Block a user