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

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import redirect, HttpResponse
from loginSystem.views import loadLoginPage
@@ -43,7 +43,7 @@ def submitCageFSInstall(request):
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -104,7 +104,7 @@ def enableOrDisable(request):
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -169,7 +169,7 @@ def submitCreatePackage(request):
return HttpResponse(json_data)
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -213,7 +213,7 @@ def deleteCLPackage(request):
return HttpResponse(json_data)
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -266,7 +266,7 @@ def saveSettings(request):
return HttpResponse(json_data)
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -352,7 +352,7 @@ def getUsageData(request):
final_json = json.dumps(finalData)
return HttpResponse(final_json)
except BaseException, msg:
except BaseException as msg:
data_ret = {'status': 0, 'error_message': str(msg), 'cpu': 0, 'memory':0}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)