mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 22:36:12 +01:00
bug fix: if scp fail download via sftp
This commit is contained in:
@@ -6651,7 +6651,18 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
statusFile.close()
|
statusFile.close()
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
logging.writeToFile(f"Success in scp command to retrieve backup {successRet}")
|
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:
|
||||||
|
logging.writeToFile(f"Failed to download file {str(msg)} [404]")
|
||||||
|
statusFile = open(tempStatusPath, 'w')
|
||||||
|
statusFile.writelines(f"Failed to download file {str(msg)} [404]")
|
||||||
|
statusFile.close()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sftp:
|
if sftp:
|
||||||
sftp.close() # Close the SFTP session
|
sftp.close() # Close the SFTP session
|
||||||
|
|||||||
Reference in New Issue
Block a user