From d25281894356db0f1f119364c59133770a78dcaa Mon Sep 17 00:00:00 2001 From: Teodora Sechkova Date: Mon, 22 Mar 2021 22:59:25 +0200 Subject: [PATCH] [client rework]: Disable exceptions-related pylint checks Temporary disable (inline) try-except-raise and broad-except warnings until client exception handling is revised (#1312). Signed-off-by: Teodora Sechkova --- tuf/client_rework/updater_rework.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tuf/client_rework/updater_rework.py b/tuf/client_rework/updater_rework.py index 2d9dfcf5b1..9900e6ffef 100644 --- a/tuf/client_rework/updater_rework.py +++ b/tuf/client_rework/updater_rework.py @@ -160,6 +160,7 @@ def download_target(self, target: Dict, destination_directory: str): destination_directory, target["filepath"] ) securesystemslib.util.persist_temp_file(temp_obj, filepath) + # pylint: disable=try-except-raise except Exception: # TODO: do something with exceptions raise @@ -182,6 +183,7 @@ def _mirror_meta_download(self, filename: str, upper_length: int) -> TextIO: temp_obj.seek(0) yield temp_obj + # pylint: disable=broad-except except Exception as exception: file_mirror_errors[file_mirror] = exception @@ -209,7 +211,7 @@ def _mirror_target_download(self, fileinfo: str) -> BinaryIO: temp_obj.seek(0) yield temp_obj - + # pylint: disable=broad-except except Exception as exception: file_mirror_errors[file_mirror] = exception @@ -280,7 +282,7 @@ def _load_root(self) -> None: for temp_obj in mirror_download: try: verified_root = self._verify_root(temp_obj) - + # pylint: disable=try-except-raise except Exception: raise