From 6bc59d789e5af2b675ba5836e86cb680f17082fc Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Thu, 1 Jun 2023 12:29:30 -0300 Subject: [PATCH] Log syncpackage LP auth errors before halting --- debian/changelog | 3 +++ syncpackage | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index f959f8f..b1c781e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ ubuntu-dev-tools (0.200) UNRELEASED; urgency=medium * Add support to see currently running autopkgtests (running-autopkgtests) + [ Athos Ribeiro ] + * syncpackage: log LP authentication errors before halting. + -- Chris Peterson Wed, 14 Feb 2024 14:58:30 -0800 ubuntu-dev-tools (0.199) unstable; urgency=medium diff --git a/syncpackage b/syncpackage index 1c72d23..2f8af59 100755 --- a/syncpackage +++ b/syncpackage @@ -652,14 +652,15 @@ def main(): if args.lpinstance is None: args.lpinstance = config.get_value("LPINSTANCE") + # devel for copyPackage and changelogUrl + kwargs = {"service": args.lpinstance, "api_version": "devel"} try: - # devel for copyPackage and changelogUrl - kwargs = {"service": args.lpinstance, "api_version": "devel"} if args.lp and not args.simulate: Launchpad.login(**kwargs) else: Launchpad.login_anonymously(**kwargs) - except IOError: + except IOError as e: + Logger.error("Could not authenticate to LP: %s", str(e)) sys.exit(1) if args.release is None: