From cec83c479b760e77ae117d6b71b6ff85e429a4fd Mon Sep 17 00:00:00 2001
From: Tim O'Donnell <timodonnell@gmail.com>
Date: Wed, 2 Oct 2019 21:10:40 -0400
Subject: [PATCH] fix

---
 mhcflurry/cluster_parallelism.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mhcflurry/cluster_parallelism.py b/mhcflurry/cluster_parallelism.py
index d3f1c1c5..83859cde 100644
--- a/mhcflurry/cluster_parallelism.py
+++ b/mhcflurry/cluster_parallelism.py
@@ -252,6 +252,7 @@ def cluster_results(
         })
 
     def result_generator():
+        additional_complete_file_path = None
         start = time.time()
         while result_items:
             print("[%0.1f sec elapsed] waiting on %d / %d items." % (
@@ -303,7 +304,8 @@ def cluster_results(
                         result_item['work_dir'], "attempt.%d" % retry_num)
                     if os.path.exists(complete_dir):
                         shutil.move(complete_dir, attempt_dir)  # directory
-                    if os.path.exists(additional_complete_file_path):
+                    if additional_complete_file and os.path.exists(
+                            additional_complete_file_path):
                         shutil.move(additional_complete_file_path, attempt_dir)
                     if os.path.exists(error_path):
                         shutil.move(error_path, attempt_dir)
-- 
GitLab