From 1d350a61f751cde4bd39fdf5053d8ef9ac011d76 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Sun, 15 Apr 2018 16:01:22 -0500 Subject: [PATCH] style(pep8): remove unreferenced variables This patch set removes unreferenced exception variables indentified by PEP8. Follow up patch sets will perform: - Better exception handling and messaging; - CICD pipeline should correctly fail these PEP8 violation. Change-Id: I681a2d3c7836eb10a5906d4b035e99aff574b18d Signed-off-by: Tin Lam --- armada/api/__init__.py | 2 +- armada/api/controller/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/armada/api/__init__.py b/armada/api/__init__.py index 895fb2bf..3d2c1cec 100644 --- a/armada/api/__init__.py +++ b/armada/api/__init__.py @@ -54,7 +54,7 @@ class BaseResource(object): try: return list(yaml.safe_load_all(raw_body.decode('utf-8'))) - except yaml.YAMLError as jex: + except yaml.YAMLError: with excutils.save_and_reraise_exception(): self.error( req.context, diff --git a/armada/api/controller/test.py b/armada/api/controller/test.py index 3980962f..3664c784 100644 --- a/armada/api/controller/test.py +++ b/armada/api/controller/test.py @@ -134,7 +134,7 @@ class TestReleasesManifestController(api.BaseResource): tiller_namespace=req.get_param( 'tiller_namespace', default=CONF.tiller_namespace)) # TODO(fmontei): Provide more sensible exception(s) here. - except Exception as e: + except Exception: err_message = 'Failed to initialize Tiller handler.' self.error(req.context, err_message) return self.return_error(