Skip to content

Commit ff724a7

Browse files
committed
close ftp if still active
1 parent 29fdc63 commit ff724a7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

gnss_lib_py/parsers/ephemeris.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ def retrieve_file(self, url, directory, filename, dest_filepath):
430430
+ src_filepath + ' from ' + url)
431431

432432
ftp.quit()
433+
if ftp is not None: # try closing if still active
434+
ftp.close()
433435
self.decompress_file(dest_filepath)
434436

435437
def decompress_file(self, filepath):

0 commit comments

Comments
 (0)