mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
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:
parent
deec2eaaa0
commit
5d71aab9ec
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue