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.contrib import admin

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig

View File

@@ -30,7 +30,7 @@ class HAManager(multi.Thread):
self.setupNode()
elif self.function == 'addManager':
self.setupNode()
except BaseException, msg:
except BaseException as msg:
logging.writeToFile( str(msg) + ' [HAManager.run]')
def setupNode(self):
@@ -72,7 +72,7 @@ class HAManager(multi.Thread):
mesg = 'Node successfully configured. [200]'
logging.statusWriter(self.data['tempStatusPath'], mesg)
except BaseException, msg:
except BaseException as msg:
logging.writeToFile(str(msg))
logging.statusWriter(self.data['tempStatusPath'], str(msg) + '. [404]')
@@ -118,7 +118,7 @@ class HAManager(multi.Thread):
return proc.ajax(1, None, data)
except BaseException, msg:
except BaseException as msg:
proc = httpProc(self.request, None, None)
return proc.ajax(0, None, str(msg))
@@ -142,7 +142,7 @@ class HAManager(multi.Thread):
return proc.ajax(1, None)
except BaseException, msg:
except BaseException as msg:
proc = httpProc(self.request, None, None)
return proc.ajax(0, None, str(msg))
@@ -163,11 +163,11 @@ class HAManager(multi.Thread):
result = subprocess.call(command, shell=True)
if result != 0:
logging.writeToFile(command + ' Failed.')
except BaseException, msg:
except BaseException as msg:
logging.writeToFile(command + 'Failed.')
return 0
except BaseException, msg:
except BaseException as msg:
logging.writeToFile(str(msg))
def setUpDataNode(self):
@@ -194,7 +194,7 @@ class HAManager(multi.Thread):
return proc.ajax(1, None)
except BaseException, msg:
except BaseException as msg:
logging.writeToFile(str(msg))
proc = httpProc(self.request, None, None)
return proc.ajax(0, str(msg))
@@ -227,7 +227,7 @@ class HAManager(multi.Thread):
return proc.ajax(1, None)
except BaseException, msg:
except BaseException as msg:
logging.writeToFile(str(msg))
proc = httpProc(self.request, None, None)
return proc.ajax(0, str(msg))

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render