Remove disable=broad-except

The pylint warning W0703:broad-except was raised only
when six was used and python 2 was still supported.

The warning is no longer raised, the exceptions are
handled/raised correctly and the disabling can be removed.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
This commit is contained in:
Teodora Sechkova 2021-09-01 17:37:03 +03:00
parent deec2eaaa0
commit 5d71aab9ec
No known key found for this signature in database
GPG key ID: 65F78F613EA1914E

View file

@ -36,7 +36,7 @@ def deserialize(self, raw_data: bytes) -> Metadata:
json_dict = json.loads(raw_data.decode("utf-8"))
metadata_obj = Metadata.from_dict(json_dict)
except Exception as e: # pylint: disable=broad-except
except Exception as e:
raise DeserializationError from e
return metadata_obj
@ -66,7 +66,7 @@ def serialize(self, metadata_obj: Metadata) -> bytes:
sort_keys=True,
).encode("utf-8")
except Exception as e: # pylint: disable=broad-except
except Exception as e:
raise SerializationError from e
return json_bytes
@ -83,7 +83,7 @@ def serialize(self, signed_obj: Signed) -> bytes:
signed_dict = signed_obj.to_dict()
canonical_bytes = encode_canonical(signed_dict).encode("utf-8")
except Exception as e: # pylint: disable=broad-except
except Exception as e:
raise SerializationError from e
return canonical_bytes