modifié: superTornado.py

This commit is contained in:
sidya82 2014-04-02 19:31:47 +02:00
parent 24e0e7f219
commit 1cd65fd995

View File

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