From 510a069de948e515e690ec866c55204ab0822e63 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Tue, 9 Jun 2020 18:59:00 +1000 Subject: [PATCH] F841 remove unused variables --- plugins/inventory/k8s.py | 2 +- plugins/modules/k8s_auth.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/inventory/k8s.py b/plugins/inventory/k8s.py index 0c663b76..9c314562 100644 --- a/plugins/inventory/k8s.py +++ b/plugins/inventory/k8s.py @@ -317,7 +317,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable, K8sAnsibleM try: self.inventory.add_child(namespace_services_group, service_name) - except AnsibleError as e: + except AnsibleError: raise ports = [{'name': port.name, diff --git a/plugins/modules/k8s_auth.py b/plugins/modules/k8s_auth.py index d225132c..3af297ba 100644 --- a/plugins/modules/k8s_auth.py +++ b/plugins/modules/k8s_auth.py @@ -251,7 +251,7 @@ class KubernetesAuthModule(AnsibleModule): self.openshift_auth_endpoint = oauth_info['authorization_endpoint'] self.openshift_token_endpoint = oauth_info['token_endpoint'] - except Exception as e: + except Exception: self.fail_json(msg="Something went wrong discovering OpenShift OAuth details.", exception=traceback.format_exc()) @@ -311,7 +311,7 @@ class KubernetesAuthModule(AnsibleModule): "kind": "DeleteOptions" } - ret = requests.delete(url, headers=headers, json=json, verify=self.con_verify_ca) + requests.delete(url, headers=headers, json=json, verify=self.con_verify_ca) # Ignore errors, the token will time out eventually anyway def fail(self, msg=None):