bug fix in template loading

This commit is contained in:
Usman Nasir
2021-03-25 20:46:04 +05:00
parent 4c07893075
commit 0959ae4056
2 changed files with 6 additions and 5 deletions

View File

@@ -345,7 +345,7 @@ class BackupManager:
def restoreSite(self, request=None, userID=None, data=None):
path = os.path.join("/home", "backup")
if not os.path.exists(path):
proc = httpProc(request, 'backup/restore.html', 'restoreBackup')
proc = httpProc(request, 'backup/restore.html', None, 'restoreBackup')
return proc.render()
else:
all_files = []
@@ -969,7 +969,7 @@ class BackupManager:
return HttpResponse(final_json)
def remoteBackups(self, request, userID=None, data=None):
proc = httpProc(request, 'backup/remoteBackups.html', 'remoteBackups')
proc = httpProc(request, 'backup/remoteBackups.html', None, 'remoteBackups')
return proc.render()
def submitRemoteBackups(self, userID=None, data=None):

View File

@@ -1939,8 +1939,9 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (
result[2])
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
if output.find('[5009') > -1:
output = ProcessUtilities.outputExecutioner(execPath)
if output.find('[5009]') > -1:
logging.CyberCPLogFileWriter.writeToFile(output)
writeToFile = open(schedulerPath, 'w')
writeToFile.writelines(output)
@@ -1968,7 +1969,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
##
output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
#output = ProcessUtilities.outputExecutioner(execPath, website.externalApp)
if output.find('1,None') > -1:
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"