Index: python/install.py
===================================================================
--- python/install.py	(revision 763fcf62a1b769e8d1c04c73b82419768cb4f1df)
+++ python/install.py	(revision 97e09f41b8bac3d39d7f1b0c0fd09cdcfd710d58)
@@ -177,5 +177,5 @@
     fortran_executable = 'CONVERT2'
 
-    if c.install_target.lower() != 'local':
+    if c.install_target.lower() != 'local': # ecgate or cca
 
         mk_compilejob(ecd + 'python/compilejob.temp', c.makefile,
@@ -195,11 +195,11 @@
                              c.ecuid, c.ecgid)
 
-        result_code = submit_job_to_ecserver(ecd + '/python/', c.install_target,
-                                             'compilejob.ksh')
+        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 + \
                '/' + target_dir
-        print 'You should get an email with subject flexcompile within ' + \
+        print 'You should get an email with subject "flexcompile" within ' + \
               'the next few minutes!'
 
Index: python/pythontest/.cache/v/cache/lastfailed
===================================================================
--- python/pythontest/.cache/v/cache/lastfailed	(revision dda0e9deecb939467ef6d43f7ceb822d7eaee6b0)
+++ python/pythontest/.cache/v/cache/lastfailed	(revision 97e09f41b8bac3d39d7f1b0c0fd09cdcfd710d58)
@@ -1,3 +1,4 @@
 {
+  "TestTools.py": true, 
   "TestTools.py::TestTools::test_init128": true, 
   "TestTools.py::TestTools::test_to_param_id": true
Index: python/pythontest/TestTools.py
===================================================================
--- python/pythontest/TestTools.py	(revision f9f7b3f87c9b58853feb20f24e537cbd24b818b1)
+++ python/pythontest/TestTools.py	(revision 97e09f41b8bac3d39d7f1b0c0fd09cdcfd710d58)
@@ -117,6 +117,22 @@
         assert True
 
-    @pytest.mark.msuser
+    def test_fail_put_file_to_ecserver(self):
+        ecuid=os.environ['ECUID']
+        ecgid=os.environ['ECGID']
+        with pytest.raises(SystemExit) as pytest_wrapped_e:
+            put_file_to_ecserver('TestData/', 'testfil.txt',
+                                 'ecgate', ecuid, ecgid)
+        assert pytest_wrapped_e.type == SystemExit
+        assert pytest_wrapped_e.value.code == '... ECACCESS-FILE-PUT FAILED!'
+
     def test_success_put_file_to_ecserver(self):
+        ecuid=os.environ['ECUID']
+        ecgid=os.environ['ECGID']
+        result = put_file_to_ecserver('TestData/', 'testfile.txt',
+                                      'ecgate', ecuid, ecgid)
+        assert result == ''
+
+    @pytest.mark.msuser_pw
+    def test_fullsuccess_put_file_to_ecserver(self):
         ecuid=os.environ['ECUID']
         ecgid=os.environ['ECGID']
@@ -134,6 +150,5 @@
     def test_success_submit_job_to_ecserver(self):
         result = submit_job_to_ecserver('ecgate', 'TestData/testfile.txt')
-        assert result == 0
-
+        assert result.strip().isdigit() == True
 
 
Index: python/pythontest/pytest.ini
===================================================================
--- python/pythontest/pytest.ini	(revision f9f7b3f87c9b58853feb20f24e537cbd24b818b1)
+++ python/pythontest/pytest.ini	(revision 97e09f41b8bac3d39d7f1b0c0fd09cdcfd710d58)
@@ -2,3 +2,3 @@
 [pytest]
 markers =
-    memberstate: Test that can be executed only as a member-state user. Password required.
+    msuser_pw: Test that can be executed only as a member-state user. Password required.
Index: python/tools.py
===================================================================
--- python/tools.py	(revision 70a0becc1f43b16494ae3af53163aaa2120186d3)
+++ python/tools.py	(revision 97e09f41b8bac3d39d7f1b0c0fd09cdcfd710d58)
@@ -446,10 +446,14 @@
     '''
     @Description:
-        Uses the ecaccess command to send a file to the ECMWF servers.
-        Catches and prints the error if it failed.
+        Uses the ecaccess-file-put command to send a file to the ECMWF servers.
+
+        NOTE:
+        The return value is just for testing reasons. It does not have
+        to be used from the calling function since the whole error handling
+        is done in here.
 
     @Input:
         ecd: string
-            The path were the file is to be stored.
+            The path were the file is stored.
 
         filename: string
@@ -457,5 +461,5 @@
 
         target: string
-            The target where the file should be sent to, e.g. the queue.
+            The target queue where the file should be sent to.
 
         ecuid: string
@@ -466,26 +470,35 @@
 
     @Return:
-        <nothing>
+        rcode: string
+            Resulting code of command execution. If successful the string
+            will be empty.
     '''
 
     try:
-        subprocess.check_call(['ecaccess-file-put',
-                               ecd + '/' + filename,
-                               target + ':/home/ms/' +
-                               ecgid + '/' + ecuid +
-                               '/' + filename])
+        rcode = subprocess.check_output(['ecaccess-file-put',
+                                          ecd + '/' + filename,
+                                          target + ':/home/ms/' +
+                                          ecgid + '/' + ecuid +
+                                          '/' + filename],
+                                         stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
-        print 'ERROR:'
-        print e
-        sys.exit('ecaccess-file-put failed!\n' + \
-                 'Probably the eccert key has expired.')
-
-    return
+        print '... ERROR CODE:\n ... ', e.returncode
+        print '... ERROR MESSAGE:\n ... ', e
+        print '... COMMAND MESSAGE:\n ...', e.output
+
+        print '\nDo you have a valid eccert key?'
+        sys.exit('... ECACCESS-FILE-PUT FAILED!')
+
+    return rcode
 
 def submit_job_to_ecserver(target, jobname):
     '''
     @Description:
-        Uses ecaccess to submit a job to the ECMWF server.
-        Catches and prints the error if one arise.
+        Uses ecaccess-job-submit command to submit a job to the ECMWF server.
+
+        NOTE:
+        The return value is just for testing reasons. It does not have
+        to be used from the calling function since the whole error handling
+        is done in here.
 
     @Input:
@@ -497,14 +510,20 @@
 
     @Return:
-        rcode: integer
-            Resulting code of subprocess.check_call.
+        rcode: string
+            Resulting code of command execution. If successful the string
+            will contain an integer number, representing the id of the job
+            at the ecmwf server.
     '''
 
     try:
-        rcode = subprocess.check_call(['ecaccess-job-submit',
-                                       '-queueName', target,
-                                       jobname])
+        rcode = subprocess.check_output(['ecaccess-job-submit',
+                                         '-queueName', target,
+                                         jobname])
     except subprocess.CalledProcessError as e:
         print '... ERROR CODE: ', e.returncode
+        print '... ERROR MESSAGE:\n ... ', e
+        print '... COMMAND MESSAGE:\n ...', e.output
+
+        print '\nDo you have a valid eccert key?'
         sys.exit('... ECACCESS-JOB-SUBMIT FAILED!')
 
