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:
parent
f230438237
commit
d565f46123
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user