From 42d9c851f1a74eb07732b752212ce0a490b0759a Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 12 Apr 2012 18:31:36 +0200 Subject: [PATCH] syncpackage: Log into Launchpad anonymously with --no-lp --- debian/changelog | 4 +++- syncpackage | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a30109b..c9b7132 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 12 Apr 2012 18:21:41 +0200 diff --git a/syncpackage b/syncpackage index 70a608f..acefbbe 100755 --- a/syncpackage +++ b/syncpackage @@ -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)