diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index ac123ec22d..d978539097 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -743,7 +743,7 @@ class RANManagement(): for x in os.listdir(): if x.endswith('.log') or x.endswith('.log.png'): - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, x, self.eNBSourceCodePath + '/cmake_targets/', silent=True) + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, x, self.eNBSourceCodePath + '/cmake_targets/', silent=True, ignorePermDenied=True) # Back to normal mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py index d4e5c1661d..c340603ba1 100644 --- a/ci-scripts/sshconnection.py +++ b/ci-scripts/sshconnection.py @@ -229,7 +229,7 @@ class SSHConnection(): else: return -1 - def copyout(self, ipaddress, username, password, source, destination, silent=False): + def copyout(self, ipaddress, username, password, source, destination, silent=False, ignorePermDenied=False): count = 0 copy_status = False if not silent: @@ -245,6 +245,10 @@ class SSHConnection(): if scp_response == 0: count = 10 copy_status = True + elif scp_response == 1 and ignorePermDenied: + logging.warning('Copy was denied but ignored!') + count = 10 + copy_status = True else: logging.warning('1 - scp_response = ' + str(scp_response)) elif scp_response == 1: @@ -253,6 +257,10 @@ class SSHConnection(): if scp_response == 0 or scp_response == 3: count = 10 copy_status = True + elif scp_response == 1 and ignorePermDenied: + logging.warning('Copy was denied but ignored!') + count = 10 + copy_status = True else: logging.warning('2 - scp_response = ' + str(scp_response)) elif scp_response == 2: