modifié: m/log.py
modifié: m/login.py modifié: superTornado.py
This commit is contained in:
parent
baeec52526
commit
e29fb0bc79
12
m/log.py
12
m/log.py
@ -31,17 +31,17 @@ class Log(object):
|
|||||||
def printL(self,pMsg,pLvl):
|
def printL(self,pMsg,pLvl):
|
||||||
self.logger.log(pLvl,pMsg)
|
self.logger.log(pLvl,pMsg)
|
||||||
if pLvl == 10 :
|
if pLvl == 10 :
|
||||||
print bcolors.DEBUG,
|
print bcolors.DEBUG
|
||||||
elif pLvl == 20 :
|
elif pLvl == 20 :
|
||||||
print bcolors.INFO,
|
print bcolors.INFO
|
||||||
elif pLvl == 25 :
|
elif pLvl == 25 :
|
||||||
print bcolors.SUCCESS,
|
print bcolors.SUCCESS
|
||||||
elif pLvl == 30 :
|
elif pLvl == 30 :
|
||||||
print bcolors.WARNING,
|
print bcolors.WARNING
|
||||||
elif pLvl == 40 :
|
elif pLvl == 40 :
|
||||||
print bcolors.FAIL,
|
print bcolors.FAIL
|
||||||
print pMsg
|
print pMsg
|
||||||
print bcolors.ENDC,
|
print bcolors.ENDC
|
||||||
|
|
||||||
class bcolors:
|
class bcolors:
|
||||||
DEBUG = '\033[94m'
|
DEBUG = '\033[94m'
|
||||||
|
@ -8,7 +8,7 @@ class Login(object):
|
|||||||
with open("m/fichier/autorise", "r") as source :
|
with open("m/fichier/autorise", "r") as source :
|
||||||
for ligne in source :
|
for ligne in source :
|
||||||
data = ligne.rstrip('\n\r').split(',')
|
data = ligne.rstrip('\n\r').split(',')
|
||||||
if data[0] in pLog :
|
if data[0] == pLog :
|
||||||
if data[1] in hashMdp :
|
if data[1] in hashMdp :
|
||||||
source.close()
|
source.close()
|
||||||
return True
|
return True
|
||||||
|
@ -174,12 +174,12 @@ if __name__ == "__main__":
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print log.printL("->Configuration Server Load Successfully !",25)
|
print log.printL("->Configuration Server Load Successfully !",25)
|
||||||
if blind == True:
|
if blind == True:
|
||||||
log.printL(" ->Blind unhabitant",25)
|
log.printL(" ->Blind unhabitant",20)
|
||||||
else :
|
else :
|
||||||
log.printL(" ->Not blind unhabitant",25)
|
log.printL(" ->Not blind unhabitant",20)
|
||||||
log.printL(" ->Ip camera : " + ipCamera,25)
|
log.printL(" ->Ip camera : " + ipCamera,20)
|
||||||
log.printL(" ->Port Camera : " + portCamera,25)
|
log.printL(" ->Port Camera : " + portCamera,20)
|
||||||
log.printL(" ->Port Server : " + portServ,25)
|
log.printL(" ->Port Server : " + portServ,20)
|
||||||
|
|
||||||
try :
|
try :
|
||||||
log.printL("->Server Start ...",20)
|
log.printL("->Server Start ...",20)
|
||||||
|
Reference in New Issue
Block a user