From d565f46123bc7208f034bfc8c2388a0eb4c79081 Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Fri, 18 Aug 2017 17:34:32 -0500 Subject: [PATCH] ReviewBot: get_devel_project(): correct error handling to only allow 404. The original intent was clearly to allow 404 (package does not exist for new packages), but crash on anything else. Instead it consumes all exceptions and does nothing different even with the e.code condition. --- ReviewBot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReviewBot.py b/ReviewBot.py index 85686759..3f69f59a 100644 --- a/ReviewBot.py +++ b/ReviewBot.py @@ -369,8 +369,8 @@ class ReviewBot(object): if node is not None: return node.get('project'), node.get('package', None) except urllib2.HTTPError, e: - if e.code == 404: - pass + if e.code != 404: + raise e return None, None def can_accept_review(self, request_id):