bugfix
This commit is contained in:
parent
5470d3be33
commit
096c35332a
@ -117,7 +117,15 @@ class UAPI:
|
||||
async def stream_linify(self, upappid, apiname, callerid, params={}):
|
||||
gen = liner(self.__call__(upappid, apiname, callerid, params=params))
|
||||
async for line in gen:
|
||||
filter = self.api.chunk_match
|
||||
if line.startswith(filter):
|
||||
line = line[len(filter):]
|
||||
if self.api.streamresponse:
|
||||
dic = json.loads(line)
|
||||
line = self.rendertmpl(self.api.streamresponse, dic)
|
||||
yield line
|
||||
else:
|
||||
debug(f'invalid line:{line}')
|
||||
|
||||
async def request(self, upappid, apiname, callerid, params={}):
|
||||
b = b''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user