From 8bd8167a282e493444f83cd4e1868c4e34761964 Mon Sep 17 00:00:00 2001 From: gnaponie Date: Aug 13 2019 07:43:15 +0000 Subject: Fix flake8 Signed-off-by: gnaponie --- diff --git a/greenwave/resources.py b/greenwave/resources.py index 9f1ddfd..195e74a 100644 --- a/greenwave/resources.py +++ b/greenwave/resources.py @@ -133,7 +133,7 @@ def retrieve_scm_from_koji(nvr): try: proxy = xmlrpc.client.ServerProxy(koji_url) build = proxy.getBuild(nvr) - except (xmlrpc.client.ProtocolError, socket.error) as err: + except (xmlrpc.client.ProtocolError, socket.error) as err: raise ConnectionError('Could not reach Koji: {}'.format(err)) return retrieve_scm_from_koji_build(nvr, build, koji_url) diff --git a/greenwave/tests/test_utils.py b/greenwave/tests/test_utils.py index adac2a8..4497f2c 100644 --- a/greenwave/tests/test_utils.py +++ b/greenwave/tests/test_utils.py @@ -19,7 +19,9 @@ from greenwave.utils import json_error (ConnectTimeout('TIMEOUT'), 502, 'TIMEOUT'), (Timeout('TIMEOUT'), 504, 'TIMEOUT'), (InternalServerError(), 500, 'The server encountered an internal error'), - (urllib3.exceptions.MaxRetryError('MAX_RETRY', '.../gating.yaml'), 502, 'There was an error retrieving the gating.yaml file at .../gating.yaml') + (urllib3.exceptions.MaxRetryError( + 'MAX_RETRY', '.../gating.yaml'), 502, ('There was an error retrieving the' + 'gating.yaml file at .../gating.yaml')) ]) def test_json_connection_error(error, expected_status_code, expected_error_message_part):