From 3f07e89851b00340089161ebb64b528965e18c4f Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 07:02:04 +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, 10 insertions(+), 10 deletions(-) diff --git a/superTornado.py b/superTornado.py index d7dad0c..95ce0a2 100644 --- a/superTornado.py +++ b/superTornado.py @@ -111,16 +111,16 @@ class TestSocket(tornado.websocket.WebSocketHandler): print "->Websocket opened" print '->lol' #while 1 : - try : - f = urlopen('http://test:a@192.168.1.15/image.jpg?cidx=791836195') - data = f.read() - encoded = base64.b64encode(data) - self.write_message(encoded) - except tornado.websocket.WebSocketClosedError: - break - else : - self.write_message(" ") - time.sleep(2) + try : + f = urlopen('http://test:a@192.168.1.15/image.jpg?cidx=791836195') + data = f.read() + encoded = base64.b64encode(data) + self.write_message(encoded) + except tornado.websocket.WebSocketClosedError: + break + else : + self.write_message(" ") + time.sleep(2) def on_message(self,mesg): pass