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