From af38224e989a0f8fdc72a65ab8152fa69cd9da19 Mon Sep 17 00:00:00 2001 From: Cezary Statkiewicz Date: Fri, 2 Mar 2018 16:16:27 +0100 Subject: [PATCH] flake8 #15 --- GeoHealthCheck/notifications.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/GeoHealthCheck/notifications.py b/GeoHealthCheck/notifications.py index e70cfa5a..82547169 100644 --- a/GeoHealthCheck/notifications.py +++ b/GeoHealthCheck/notifications.py @@ -211,8 +211,6 @@ def do_webhook(config, resource, run, status_changed, result): LOGGER.warning("Cannot send to {}: {}" .format(rcp, err), exc_info=err) - - resource_view = '{}/resource/{}'.format( config['GHC_SITE_URL'], resource.identifier) @@ -222,7 +220,7 @@ def do_webhook(config, resource, run, status_changed, result): params['ghc.resource.title'] = resource.title params['ghc.resource.type'] = resource.resource_type params['ghc.resource.view'] = resource_view - + try: r = requests.post(url, params) LOGGER.info("webhook deployed, got %s as reposnse", @@ -268,4 +266,4 @@ def notify(config, resource, run, last_run_success): chann_handler(config, resource, run, status_changed, result) except Exception, err: LOGGER.warning("couldn't run notification for %s: %s", - chann_handler.func_name, err, exc_info=err) + chann_handler.func_name, err, exc_info=err)