style(pep8): remove E722 exclusion
This patch set removes E722 pep8 exclusion that allows for "bare" except: statement. Change-Id: Icdce885366541b88aabbef35166cf196a588676b Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
2b714888c4
commit
8d1521e96c
@ -86,7 +86,7 @@ class ContextMiddleware(object):
|
||||
def is_valid_uuid(self, id, version=4):
|
||||
try:
|
||||
uuid_obj = UUID(id, version=version)
|
||||
except:
|
||||
except (TypeError, ValueError):
|
||||
return False
|
||||
|
||||
return str(uuid_obj) == id
|
||||
|
@ -41,7 +41,7 @@ class CliAction(object):
|
||||
except ArmadaBaseException:
|
||||
self.logger.exception('Caught internal exception')
|
||||
sys.exit(1)
|
||||
except:
|
||||
except Exception:
|
||||
self.logger.exception('Caught unexpected exception')
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -41,7 +41,7 @@ class K8s(object):
|
||||
'''
|
||||
try:
|
||||
config.load_incluster_config()
|
||||
except:
|
||||
except config.config_exception.ConfigException:
|
||||
config.load_kube_config()
|
||||
|
||||
self.client = client.CoreV1Api()
|
||||
|
@ -35,7 +35,7 @@ def is_connected():
|
||||
host = socket.gethostbyname("www.github.com")
|
||||
socket.create_connection((host, 80), 2)
|
||||
return True
|
||||
except:
|
||||
except (socket.error, socket.herror, socket.timeout):
|
||||
pass
|
||||
return False
|
||||
|
||||
|
@ -229,7 +229,7 @@ def validate_armada_documents(documents):
|
||||
def validate_manifest_url(value):
|
||||
try:
|
||||
return (requests.get(value).status_code == 200)
|
||||
except:
|
||||
except requests.exceptions.RequestException:
|
||||
return False
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user