From 95ae8055d83857a4f32dbd36e4f3edc09488ac05 Mon Sep 17 00:00:00 2001
From: Jeremy Auguste <jeremy.auguste@dhcp-14.lidil.univ-mrs.fr>
Date: Thu, 9 Nov 2017 16:01:14 +0100
Subject: [PATCH] Maybe fixed issue with oarsub not working

---
 oargen.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/oargen.py b/oargen.py
index b808789..3215c7f 100755
--- a/oargen.py
+++ b/oargen.py
@@ -48,7 +48,8 @@ def main():
     args = argparser()
 
     command = ["oarsub"]
-    properties = "-p \""
+    command.append("-p")
+    properties = "\""
     if args.gpu:
         properties += "(gpu IS NOT NULL)"
     else:
@@ -58,15 +59,15 @@ def main():
     properties += "\""
     command.append(properties)
 
-    ressources = "-l core={},walltime={}:00:00".format(args.core, args.time)
+    command.append("-l")
+    ressources = "core={},walltime={}:00:00".format(args.core, args.time)
     command.append(ressources)
 
     if args.besteffort:
-        command.append("-t besteffort")
-        command.append("-t idempotent")
+        command.extend(["-t", "besteffort", "-t", "idempotent"])
 
     if args.checkpoint is not None:
-        command.append("--checkpoint {}".format(args.checkpoint))
+        command.extend(["--checkpoint", args.checkpoint])
 
     if args.interactive:
         command.append('-I')
-- 
GitLab