modifié: superTornado.py
This commit is contained in:
parent
8f13b1f7e4
commit
f912554bdb
@ -16,7 +16,7 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
|
|
||||||
login = Login()
|
login = Login()
|
||||||
autorise = login.connexion(iden, mdp)
|
autorise = login.connexion(iden, mdp)
|
||||||
# maison = httplib.HTTPConnection("192.168.16.150", 80)
|
#maison = httplib.HTTPConnection("192.168.16.150", 80)
|
||||||
if autorise == True:
|
if autorise == True:
|
||||||
ficLog.enregDansLog(iden,"Authorized user connection",info[0])
|
ficLog.enregDansLog(iden,"Authorized user connection",info[0])
|
||||||
if confAveug == True:
|
if confAveug == True:
|
||||||
@ -26,7 +26,7 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
print '->Send visual alarm authorized user'
|
print '->Send visual alarm authorized user'
|
||||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||||
print "->Send to client authorized user access"
|
print "->Send to client authorized user access"
|
||||||
# redirection autorisé
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
ficLog.enregDansLog(iden,"Unauthorized user connection",info[0])
|
ficLog.enregDansLog(iden,"Unauthorized user connection",info[0])
|
||||||
@ -37,7 +37,7 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
print '->Send visual alarm unauthorized user'
|
print '->Send visual alarm unauthorized user'
|
||||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||||
print "->Send to client unauthorized user access"
|
print "->Send to client unauthorized user access"
|
||||||
# redirection non autorisé
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -50,7 +50,6 @@ application = tornado.web.Application([
|
|||||||
])
|
])
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# chargement congfig
|
|
||||||
hand = LoadConf()
|
hand = LoadConf()
|
||||||
confAveug = hand.estAveugle()
|
confAveug = hand.estAveugle()
|
||||||
if confAveug == True:
|
if confAveug == True:
|
||||||
|
Reference in New Issue
Block a user