From 729b48ad130d846bb01d8e1d281ee7d69975c81a Mon Sep 17 00:00:00 2001 From: Jeremy Auguste <jeremy.auguste@lis-lab.fr> Date: Tue, 13 Nov 2018 17:02:18 +0100 Subject: [PATCH] Correctly fixed host arg --- oargen.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/oargen.py b/oargen.py index 2006af9..47857cd 100755 --- a/oargen.py +++ b/oargen.py @@ -59,8 +59,12 @@ def prepare_oarsub(gpu, hosts, core, time, else: properties += "(gpu IS NULL)" if hosts: - for host in hosts: - properties += " OR host LIKE '{}'".format(host) + properties += " AND (" + for idx, host in enumerate(hosts): + if idx != 0: + properties += " OR " + properties += "host LIKE '{}'".format(host) + properties += ")" if ignore_hosts: for host in ignore_hosts: properties += " AND host NOT LIKE '{}'".format(host) -- GitLab