Skip to content

Commit

Permalink
fix TypeError exception in case of unresponsive service (Chia-Network…
Browse files Browse the repository at this point in the history
  • Loading branch information
linnik committed May 12, 2021
1 parent df7dad8 commit 2b19635
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chia/cmds/start_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ async def async_start(root_path: Path, group: str, restart: bool) -> None:
continue
print(f"{service}: ", end="", flush=True)
msg = await daemon.start_service(service_name=service)
success = msg["data"]["success"]
success = msg and msg["data"]["success"]

if success is True:
print("started")
else:
error = msg["data"]["error"]
error = "no response"
if msg:
error = msg["data"]["error"]
print(f"{service} failed to start. Error: {error}")
await daemon.close()

0 comments on commit 2b19635

Please sign in to comment.