From 2b873510634c388f6e9ae5c9cf7d05db091676ab Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 21 Jan 2015 09:56:28 -0800 Subject: [PATCH] Report 404 errors from Gerrit and continue. Currently, we get a 404 from Gerrit in the event that two projects have the same Change-Id. We should be able to handle this and actually cherry-pick each change so we can check multi-project changes, but for now just skip these changes. Change-Id: I7bc63208998d58beec83b71b302450d9be3ea026 --- tools/bionicbb/gmail_listener.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/bionicbb/gmail_listener.py b/tools/bionicbb/gmail_listener.py index 6a8b9e6e7..f4936d609 100644 --- a/tools/bionicbb/gmail_listener.py +++ b/tools/bionicbb/gmail_listener.py @@ -297,6 +297,13 @@ def process_message(msg, dry_run): except NotImplementedError as ex: print ex return False + except gerrit.GerritError as ex: + if ex.code == 404: + print '{}(404): {}!'.format( + termcolor.colored('ERROR', 'red'), ex) + return True + else: + return False def main(argc, argv):