Skip to content

Commit

Permalink
Update fifo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
manatlan authored Jun 3, 2024
1 parent f59d16a commit d456af3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions htagweb/fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ async def com(self,command:str,**args) -> "str|dict": # for client only
frame = await fifo_in.readline()

#print("Client receive:",frame)
c = json.loads(frame.strip())
try:
c = json.loads(frame.strip())
except Exception:
raise Exception(f"com error : {frame}")
return c["response"]


Expand All @@ -87,4 +90,4 @@ def destroy(self):
os.kill(int(fid.readline().strip()),9)
except ProcessLookupError:
pass
self.removePipes()
self.removePipes()

0 comments on commit d456af3

Please sign in to comment.