Skip to content

Commit

Permalink
Disable broad-except inline
Browse files Browse the repository at this point in the history
pylint cannot figure out that we store the exceptions
in a dictionary to raise them later so we disable
the warning. This should be reviewed in the future still.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
  • Loading branch information
sechkova committed Apr 8, 2021
1 parent 08bf93e commit deee5b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tuf/client_rework/mirrors_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ def meta_download(self, filename: str, upper_length: int) -> TextIO:
temp_obj.seek(0)
yield temp_obj

except Exception as exception:
# pylint cannot figure out that we store the exceptions
# in a dictionary to raise them later so we disable
# the warning. This should be reviewed in the future still.
except Exception as exception: # pylint: disable=broad-except
file_mirror_errors[file_mirror] = exception

finally:
Expand All @@ -187,7 +190,10 @@ def target_download(self, filename: str, strict_length: int) -> BinaryIO:
temp_obj.seek(0)
yield temp_obj

except Exception as exception:
# pylint cannot figure out that we store the exceptions
# in a dictionary to raise them later so we disable
# the warning. This should be reviewed in the future still.
except Exception as exception: # pylint: disable=broad-except
file_mirror_errors[file_mirror] = exception

finally:
Expand Down

0 comments on commit deee5b2

Please sign in to comment.