diff --git a/python/install.py b/python/install.py
index 31074b3305e4d90e69db5ebea450f9b4e009b9e8..b20df9ae3adaf3a9af20008559f7297423dc4d84 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 cb96eb022e9a71bfb9e684b31fe574cf5100dcbd..2f3ff7ec6991a13c25e102ce76e334270b4d94c5 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 14cd3caaba0169cb08d5f7c42695d0d78a49601f..91114a12dcdd27d4d490ebf17b68351560acc313 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'