syncpackage: Log into Launchpad anonymously with --no-lp

This commit is contained in:
Stefano Rivera 2012-04-12 18:31:36 +02:00
parent b05cbfd8f9
commit 42d9c851f1
2 changed files with 10 additions and 2 deletions

4
debian/changelog vendored
View File

@ -1,6 +1,8 @@
ubuntu-dev-tools (0.141) UNRELEASED; urgency=low
* seeded-in-ubuntu: Log into launchpad anonymously (LP: #979849)
* syncpackage: Log into Launchpad anonymously with --no-lp
(LP: #979849)
* seeded-in-ubuntu: Log into Launchpad anonymously.
-- Stefano Rivera <stefanor@debian.org> Thu, 12 Apr 2012 18:21:41 +0200

View File

@ -633,9 +633,15 @@ def main():
if options.lpinstance is None:
options.lpinstance = config.get_value('LPINSTANCE')
try:
# devel for copyPackage and changelogUrl
Launchpad.login(service=options.lpinstance, api_version='devel')
kwargs = {'service': options.lpinstance,
'api_version': 'devel'}
if options.lp:
Launchpad.login(**kwargs)
else:
Launchpad.login_anonymously(**kwargs)
except IOError:
sys.exit(1)