This commit is contained in:
Usman Nasir
2019-12-10 15:09:10 +05:00
parent d0dc397463
commit 5e7aeeb597
231 changed files with 1698 additions and 1697 deletions

View File

@@ -14,13 +14,13 @@ class CronUtil:
try:
f = open(cronPath, 'r').read()
print f
except BaseException, msg:
print "0,CyberPanel," + str(msg)
print(f)
except BaseException as msg:
print("0,CyberPanel," + str(msg))
return 1
except BaseException, msg:
print "0,CyberPanel," + str(msg)
except BaseException as msg:
print("0,CyberPanel," + str(msg))
@staticmethod
def saveCronChanges(externalApp, finalCron, line):
@@ -40,9 +40,9 @@ class CronUtil:
with open(cronPath, 'w') as file:
file.writelines(data)
print "1,None"
except BaseException, msg:
print "0," + str(msg)
print("1,None")
except BaseException as msg:
print("0," + str(msg))
@staticmethod
def remCronbyLine(externalApp, line):
@@ -68,9 +68,9 @@ class CronUtil:
counter = counter + 1
print "1," + removedLine
except BaseException, msg:
print "0," + str(msg)
print("1," + removedLine)
except BaseException as msg:
print("0," + str(msg))
@staticmethod
def addNewCron(externalApp, finalCron):
@@ -80,9 +80,9 @@ class CronUtil:
with open(CronPath, "a") as file:
file.write(finalCron + "\n")
print "1,None"
except BaseException, msg:
print "0," + str(msg)
print("1,None")
except BaseException as msg:
print("0," + str(msg))
@staticmethod
def CronPrem(mode):