modifié: superTornado.py

This commit is contained in:
sidya82 2014-02-27 20:09:53 +01:00
parent 8f13b1f7e4
commit f912554bdb

View File

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