modifié: superTornado.py

This commit is contained in:
sidya82 2014-04-02 19:26:52 +02:00
parent f6728718c5
commit 24e0e7f219
1 changed files with 6 additions and 3 deletions

View File

@ -248,13 +248,16 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
"""
try :
temp = open("temp","w")
temp2 = open("temp2","w")
socket.setdefaulttimeout(5)
f = urlopen(GlobalVars.urlCamera)
temp.write(urlopen(GlobalVars.urlCamera))
temp.close
temp = open("temp","r")
isData = False
for ligne in f:
for ligne in temp:
data = ligne.rstrip('\r\n')
if isData == True:
temp.write(data)
temp2.write(data)
if data == "ENDSECTIONEVENT" :
isData = True
data = f.read()