Skip to content

Commit 6682659

Browse files
committed
Disable broad-except inline
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 <[email protected]>
1 parent 619cbee commit 6682659

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tuf/client_rework/mirrors_download.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ def meta_download(self, filename: str, upper_length: int) -> TextIO:
164164
temp_obj.seek(0)
165165
yield temp_obj
166166

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

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

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

193199
finally:

0 commit comments

Comments
 (0)