This commit is contained in:
yumoqing 2025-09-02 16:53:30 +08:00
parent a31bdd6d86
commit 064b30eb95

View File

@ -171,10 +171,14 @@ class UAPI:
gen = liner(self.__call__(upappid, apiname, callerid, params=params))
async for line in gen:
filter = self.uapi.chunk_match
if filter:
filter = filter.encode('utf-8')
else:
filter = b''
if line.startswith(filter):
line = line[len(filter):]
if self.uapi.response:
dic = json.loads(line)
dic = json.loads(line.decode('utf-8')
line = self.rendertmpl(self.uapi.response, dic)
yield line + '\n'
else: