From eda032d3c6f705a7cbbec73cd293d0e5c734ce54 Mon Sep 17 00:00:00 2001 From: Mahmudur Date: Tue, 30 Aug 2022 20:05:22 -0400 Subject: [PATCH] try reconnecting after connection error --- scripts/get_reference_genomes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/get_reference_genomes.py b/scripts/get_reference_genomes.py index 886f3cb..a17c60a 100755 --- a/scripts/get_reference_genomes.py +++ b/scripts/get_reference_genomes.py @@ -211,6 +211,10 @@ def main(): print('Problem downloading genome ' + current_directory_name + ' due to a closed onnection, skipping this.') cmd = 'rm -rf ' + path+'/'+current_directory_name subprocess.call(cmd.split(' ')) + + helper.is_connected = False + while not helper.is_connected: + helper.connect() helper.return_to_original_direct() continue total_downloaded += 1