modifié: superTornado.py

This commit is contained in:
sidya82 2014-04-02 16:54:22 +02:00
parent 7a86e5c6b0
commit 3f026b5de6
1 changed files with 2 additions and 0 deletions

View File

@ -247,9 +247,11 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
Allow send the image in the websocket Allow send the image in the websocket
""" """
try : try :
temp = open("temp","w")
socket.setdefaulttimeout(5) socket.setdefaulttimeout(5)
f = urlopen(GlobalVars.urlCamera) f = urlopen(GlobalVars.urlCamera)
data = f.read() data = f.read()
temp = f.write()
encoded = base64.b64encode(data) encoded = base64.b64encode(data)
f.close() f.close()
self.write_message(encoded) self.write_message(encoded)