From 763fcf62a1b769e8d1c04c73b82419768cb4f1df Mon Sep 17 00:00:00 2001
From: Anne Philipp <anne.philipp@univie.ac.at>
Date: Fri, 31 Aug 2018 18:33:13 +0200
Subject: [PATCH] corrected function argument list of submit_job_to_ecgate

---
 python/install.py              | 4 ++--
 python/pythontest/TestTools.py | 5 ++---
 python/submit.py               | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/python/install.py b/python/install.py
index 31074b3..b20df9a 100755
--- a/python/install.py
+++ b/python/install.py
@@ -194,8 +194,8 @@ def install_via_gateway(c):
         put_file_to_ecserver(ecd, tarball_name, c.install_target,
                              c.ecuid, c.ecgid)
 
-        submit_job_to_ecserver(ecd + '/python/', c.install_target,
-                               'compilejob.ksh')
+        result_code = submit_job_to_ecserver(ecd + '/python/', c.install_target,
+                                             'compilejob.ksh')
 
         print 'job compilation script has been submitted to ecgate for ' + \
               'installation in ' + c.flexpart_root_scripts + \
diff --git a/python/pythontest/TestTools.py b/python/pythontest/TestTools.py
index cb96eb0..2f3ff7e 100644
--- a/python/pythontest/TestTools.py
+++ b/python/pythontest/TestTools.py
@@ -120,14 +120,13 @@ class TestTools():
 
     def test_fail_submit_job_to_ecserver(self):
         with pytest.raises(SystemExit) as pytest_wrapped_e:
-            submit_job_to_ecserver('${HOME}', 'ecgate', 'job.ksh')
+            submit_job_to_ecserver('ecgate', 'job.ksh')
         assert pytest_wrapped_e.type == SystemExit
         assert pytest_wrapped_e.value.code == '... ECACCESS-JOB-SUBMIT FAILED!'
 
     def test_success_submit_job_to_ecserver(self):
 
-        result = submit_job_to_ecserver('TestData/testfile.txt',
-                                        'ecgate', 'TestData/testfile.txt')
+        result = submit_job_to_ecserver('ecgate', 'TestData/testfile.txt')
         assert result == 0
 
 
diff --git a/python/submit.py b/python/submit.py
index 14cd3ca..91114a1 100755
--- a/python/submit.py
+++ b/python/submit.py
@@ -160,7 +160,7 @@ def submit(jtemplate, c, queue):
         with open(job_file, 'w') as f:
             f.write('\n'.join(lftextondemand))
 
-        submit_job_to_ecserver('', queue, job_file)
+        result_code = submit_job_to_ecserver(queue, job_file)
 
     else:
     # --------- create operational job script ----------------------------------
@@ -186,7 +186,7 @@ def submit(jtemplate, c, queue):
         with open(job_file, 'w') as f:
             f.write('\n'.join(lftextoper))
 
-        submit_job_to_ecserver('', queue, job_file)
+        result_code = submit_job_to_ecserver(queue, job_file)
 
     # --------------------------------------------------------------------------
     print 'You should get an email with subject flex.hostname.pid'
-- 
GitLab