From 9e5010864ddc825654335bddfcf241a938a4105b Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Tue, 6 Aug 2019 16:12:34 +0200 Subject: [PATCH] PR review --- deployment/builder/app/main.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deployment/builder/app/main.py b/deployment/builder/app/main.py index b3b291b30..0758f267e 100644 --- a/deployment/builder/app/main.py +++ b/deployment/builder/app/main.py @@ -78,20 +78,17 @@ def dockerhub(): if callback_url: requests.post(url=callback_url, json={"state": "success"}) - if callback_url: - requests.post(url=callback_url, json={"state": "success"}) - return "OK" - except ImageUpdateError: print_to_stderr("Error updating local images via docker registry!") + if callback_url: + requests.post(url=callback_url, json={"state": "error"}) except Exception as e: print_to_stderr( f"Fatal Error while updating images: Unhandled exception encountered: {e}" ) - raise - finally: if callback_url: requests.post(url=callback_url, json={"state": "error"}) + return "OK"