From 52cd3f5c582e0aa66a486d0c17eddc4b59c5d5ec Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Tue, 16 Nov 2021 19:02:47 +0000
Subject: [PATCH] fix typo in logical check

---
 binarycpython/utils/HPC.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/binarycpython/utils/HPC.py b/binarycpython/utils/HPC.py
index 57053bd23..9220a23cb 100644
--- a/binarycpython/utils/HPC.py
+++ b/binarycpython/utils/HPC.py
@@ -301,7 +301,8 @@ class HPC(condor,slurm):
         status = self.HPC_get_status()
         print("Job status",status)
 
-        if self.grid_options['HPC_force_join'] != 0 or status != "finished":
+        if self.grid_options['HPC_force_join'] == 0 and \
+           status != "finished":
             # job did not finish : save a snapshot
             print("This job did not finish (status is {status}) : cannot join".format(status=status))
         else:
-- 
GitLab