modifié: superTornado.py
This commit is contained in:
parent
24e0e7f219
commit
1cd65fd995
@ -248,18 +248,15 @@ 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()
|
||||||
encoded = base64.b64encode(data)
|
encoded = base64.b64encode(data)
|
||||||
f.close()
|
f.close()
|
||||||
|
Reference in New Issue
Block a user