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.
This commit is contained in:
Jimmy Berry 2017-08-18 17:34:32 -05:00
parent f230438237
commit d565f46123

View File

@ -369,8 +369,8 @@ class ReviewBot(object):
if node is not None: if node is not None:
return node.get('project'), node.get('package', None) return node.get('project'), node.get('package', None)
except urllib2.HTTPError, e: except urllib2.HTTPError, e:
if e.code == 404: if e.code != 404:
pass raise e
return None, None return None, None
def can_accept_review(self, request_id): def can_accept_review(self, request_id):