Skip to content

Commit a48a6b9

Browse files
committed
Verifies that the task is not None before checking attrs.
1 parent b652c0f commit a48a6b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

async_substrate_interface/async_substrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ async def retrieve(self, item_id: str) -> Optional[dict]:
833833
return self._received_subscriptions[item_id].get_nowait()
834834
except asyncio.QueueEmpty:
835835
pass
836-
if self._send_recv_task.done():
836+
if self._send_recv_task is not None and self._send_recv_task.done():
837837
if isinstance(e := self._send_recv_task.result(), Exception):
838838
raise e
839839
await asyncio.sleep(0.1)

0 commit comments

Comments
 (0)