Skip to content

Commit d458b84

Browse files
committed
rnacentral_pipeline\rnacentral\genome_mapping\igv.py broad-exception-caught
Catching Exception might hide unexpected exceptions (e.g., due to new code that will be added).   The function ftp calls ftplib.FTP's quit (in line 40). The specific ftplib.all_errors   can be used instead.   See  https://docs.python.org/3/library/ftplib.html
1 parent 5d12811 commit d458b84

File tree

1 file changed

+1
-1
lines changed
  • rnacentral_pipeline/rnacentral/genome_mapping

1 file changed

+1
-1
lines changed

rnacentral_pipeline/rnacentral/genome_mapping/igv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def ftp(host):
3838

3939
try:
4040
conn.quit()
41-
except Exception as err:
41+
except ftplib.all_errors as err:
4242
LOGGER.info("Failed to close FTP connection")
4343
LOGGER.exception(err)
4444

0 commit comments

Comments
 (0)