modifié: superTornado.py
This commit is contained in:
parent
51ff48c4cd
commit
1ae32038ec
@ -253,7 +253,7 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
f = urlopen(GlobalVars.urlCamera)
|
f = urlopen(GlobalVars.urlCamera)
|
||||||
temp.write(f.read())
|
temp.write(f.read())
|
||||||
temp.close()
|
temp.close()
|
||||||
with open("temp","r") as d :
|
with open("temp","r") as temp :
|
||||||
with open("temp2","w") as dest :
|
with open("temp2","w") as dest :
|
||||||
isData = False
|
isData = False
|
||||||
for ligne in temp :
|
for ligne in temp :
|
||||||
@ -265,8 +265,9 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
if data == "ENDSECTIONEVENT" :
|
if data == "ENDSECTIONEVENT" :
|
||||||
isData = True
|
isData = True
|
||||||
data = f.read()
|
data = f.read()
|
||||||
d.close()
|
dest.close()
|
||||||
dest.close()
|
temp.close()
|
||||||
|
|
||||||
with open("temp2","r") as data :
|
with open("temp2","r") as data :
|
||||||
encoded = base64.b64encode(data.read())
|
encoded = base64.b64encode(data.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
Reference in New Issue
Block a user