mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-05 22:29:05 +01:00
bug fix: if scp fail download via sftp
This commit is contained in:
@@ -6647,12 +6647,10 @@ class ApplicationInstaller(multi.Thread):
|
||||
if errorRet:
|
||||
logging.writeToFile(f"Error in scp command to retrieve backup {errorRet}")
|
||||
statusFile = open(tempStatusPath, 'w')
|
||||
statusFile.writelines(f"Error in scp command to retrieve backup {errorRet} [404]")
|
||||
statusFile.writelines(f"Error in scp command to retrieve backup {errorRet}.")
|
||||
statusFile.close()
|
||||
return 0
|
||||
else:
|
||||
|
||||
try:
|
||||
logging.writeToFile(f"Success in scp command to retrieve backup {successRet}")
|
||||
sftp.get(f'cpbackups/{folder}/{backupfile}', f'/home/cyberpanel/{backupfile}',
|
||||
callback=self.UpdateDownloadStatus)
|
||||
except BaseException as msg:
|
||||
@@ -6662,6 +6660,9 @@ class ApplicationInstaller(multi.Thread):
|
||||
statusFile.close()
|
||||
return 0
|
||||
|
||||
else:
|
||||
logging.writeToFile(f"Success in scp command to retrieve backup {successRet}")
|
||||
|
||||
|
||||
|
||||
if sftp:
|
||||
|
||||
Reference in New Issue
Block a user