From 357fadedca1e581ff476c63edc06c032308c2f87 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Wed, 2 Apr 2014 17:30:40 +0200 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/superTornado.py b/superTornado.py index 5696be7..90acfff 100644 --- a/superTornado.py +++ b/superTornado.py @@ -250,7 +250,14 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler): temp = open("temp","w") socket.setdefaulttimeout(5) f = urlopen(GlobalVars.urlCamera) - data = f.read() + isData = False + for ligne in f: + if ligne == "--MOBOTIX_Fast_Serverpush--": + isData = False + if isData == True : + data = ligne + if ligne == "ENDSECTION EVENT": + isData = True temp.write(f.read()) encoded = base64.b64encode(data) f.close()