From 14ec8b46ece7efd15149029786075d4ec7ed3f73 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 04:39:02 +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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/superTornado.py b/superTornado.py index 5b0b973..e17ae4c 100644 --- a/superTornado.py +++ b/superTornado.py @@ -4,7 +4,6 @@ import tornado.httpserver import tornado.websocket import tornado.options import base64 -import tornado.web.RequestHandler.request from urllib import urlopen @@ -32,7 +31,7 @@ class MainHandler(BaseHandler): autorise = login.connexion(iden, mdp) #maison = httplib.HTTPConnection("192.168.16.150", 80) if autorise == True: - ficLog.enregDansLog(iden,"Authorized user connection",self.remote_ip()) + ficLog.enregDansLog(iden,"Authorized user connection",self.request.remote_ip.() if confAveug == True: print '->Send audio alarm authorized user' print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")' @@ -61,7 +60,7 @@ class UnauthorizedHandler(BaseHandler): force = self.get_argument("illegalAccess","") if force == "1" : self.set_secure_cookie("user", "illegalUser") - ficLog.enregDansLog("illegalUser","Unauthorized user connection",self.remote_ip()) + ficLog.enregDansLog("illegalUser","Unauthorized user connection",self.request.remote_ip.()) if confAveug == True: print '->Send audio alarm unauthorized user' print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")'