mirror of
https://github.com/openkmip/pykmip
synced 2025-12-14 23:33:19 +00:00
Fixing violations of E722 for flake8 checks
This change fixes violations of E722, the use of except without specifying an exception type. For now the high-level Exception class is used as a generic catchall. In the future these cases will be updated to handle the specific exceptions expected.
This commit is contained in:
@@ -1208,7 +1208,7 @@ class CryptographyEngine(api.CryptographicEngine):
|
||||
backend=default_backend()
|
||||
)
|
||||
return private_key
|
||||
except:
|
||||
except Exception:
|
||||
private_key = serialization.load_der_private_key(
|
||||
bytes,
|
||||
password=None,
|
||||
@@ -1271,7 +1271,7 @@ class CryptographyEngine(api.CryptographicEngine):
|
||||
if crypto_alg == enums.CryptographicAlgorithm.RSA:
|
||||
try:
|
||||
key = self._create_RSA_private_key(signing_key)
|
||||
except:
|
||||
except Exception:
|
||||
raise exceptions.InvalidField('Unable to deserialize key '
|
||||
'bytes, unknown format.')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user