mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-06 10:26:23 +02:00
p3
This commit is contained in:
@@ -30,7 +30,7 @@ class remoteTransferUtilities:
|
||||
os.remove(pathToKey)
|
||||
except:
|
||||
pass
|
||||
print "1,None"
|
||||
print("1,None")
|
||||
return
|
||||
except:
|
||||
pass
|
||||
@@ -45,12 +45,12 @@ class remoteTransferUtilities:
|
||||
os.remove(pathToKey)
|
||||
except:
|
||||
pass
|
||||
print "1,None"
|
||||
print("1,None")
|
||||
return
|
||||
|
||||
except BaseException,msg:
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile("For remote transfer, I am not able to write key to auth file, Error Message: "+str(msg))
|
||||
print "0,"+"For remote transfer, I am not able to write key to auth file, Error Message: " + str(msg)
|
||||
print("0,"+"For remote transfer, I am not able to write key to auth file, Error Message: " + str(msg))
|
||||
|
||||
## House keeping function to run remote backups
|
||||
@staticmethod
|
||||
@@ -110,7 +110,7 @@ class remoteTransferUtilities:
|
||||
|
||||
return
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
writeToFile = open(backupLogPath, "w+")
|
||||
writeToFile.writelines(str(msg) + " [5010]" + "\n")
|
||||
writeToFile.close()
|
||||
@@ -168,7 +168,7 @@ class remoteTransferUtilities:
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%m.%d.%Y_%H-%M-%S") + "]" + "Failed to generate local backup for: " + virtualHost + "\n")
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [remoteTransferUtilities.backupProcess:173]")
|
||||
pass
|
||||
|
||||
@@ -181,7 +181,7 @@ class remoteTransferUtilities:
|
||||
#time.sleep(5)
|
||||
# rmtree(dir)
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [backupProcess]")
|
||||
|
||||
@staticmethod
|
||||
@@ -194,7 +194,7 @@ class remoteTransferUtilities:
|
||||
|
||||
os.remove(completedPathToSend)
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")
|
||||
|
||||
@staticmethod
|
||||
@@ -236,7 +236,7 @@ class remoteTransferUtilities:
|
||||
|
||||
return
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
backupLogPath = backupDir + "/backup_log"
|
||||
writeToFile = open(backupLogPath, "w+")
|
||||
writeToFile.writelines(str(msg) + " [5010]" + "\n")
|
||||
@@ -320,7 +320,7 @@ class remoteTransferUtilities:
|
||||
"%m.%d.%Y_%H-%M-%S") + "]" + " Backup Restore complete\n")
|
||||
writeToFile.writelines("completed[success]")
|
||||
|
||||
except BaseException, msg:
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [remoteTransferUtilities.startRestore]")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user