From 179ef4b71d93eaced03274a3234d685a399203e3 Mon Sep 17 00:00:00 2001 From: Terence Simpson Date: Mon, 14 Feb 2011 20:54:19 +0000 Subject: [PATCH] Don't blow-up on private bugs from the Launchpad API --- Bugtracker/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bugtracker/plugin.py b/Bugtracker/plugin.py index 8e8c717..193b3fb 100644 --- a/Bugtracker/plugin.py +++ b/Bugtracker/plugin.py @@ -698,6 +698,9 @@ class Launchpad(IBugtracker): assignee = '' except Exception, e: +#NOTE: The LP API will raise a lazr.restfulclient.errors.HTTPError with private bugs, so bugdata.private is useless..., do the checking here instead + if e.__class__.__name__ == 'HTTPError': # messy, but meh + raise BugtrackerError, e.content # should be 'Bug nnnnn is private' supylog.exception("Error gathering bug data for %s bug %d" % (self.description, id)) s = 'Could not parse data returned by %s: %s (%s/bugs/%d)' % (self.description, e, self.url, id) raise BugtrackerError, s