From f1e370ab1ac166ea3280ab4ab107ca260b4a31b7 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 09:01:14 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/superTornado.py b/superTornado.py index e70f8a9..dfcf1d4 100644 --- a/superTornado.py +++ b/superTornado.py @@ -115,24 +115,8 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler): def on_close(self): print "->Websocket closed" - if not self.current_user : - iden="IllegalUser" - ficLog.enregDansLog(iden,"Unauthorized user deconnection","IP TO DO") - else : - iden = self.current_user - ficLog.enregDansLog(iden,"Authorized user deconnection","IP TO DO") - - - if confAveug == True: - print '->Send audio alarm deconnection user' - print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20rompue")' - else: - print '->Send visual alarm deconnection user' - print 'maison.request("GET", "micom/lamp.php?room=salon1&order=0")' - print"->"+iden+" Deconnection" - - self.clear_cookie("user") - self.redirect("/") + dc = httplib.HTTPConnection("127.0.0.1", 80) + dc.request("POST", "/disconnection")