Skip to content

Commit f365a22

Browse files
committed
Remove block parameter from get_msg()
1 parent 7a3abba commit f365a22

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

jupyter_client/channels.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,12 @@ async def _recv(self, **kwargs) -> t.Dict[str, t.Any]:
216216
ident, smsg = self.session.feed_identities(msg)
217217
return self.session.deserialize(smsg)
218218

219-
async def get_msg(
220-
self, block: bool = True, timeout: t.Optional[float] = None
221-
) -> t.Dict[str, t.Any]:
219+
async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]:
222220
""" Gets a message if there is one that is ready. """
223221
assert self.socket is not None
224-
if block:
225-
if timeout is not None:
226-
timeout *= 1000 # seconds to ms
227-
ready = await self.socket.poll(timeout)
228-
else:
229-
ready = await self.socket.poll(0)
222+
if timeout is not None:
223+
timeout *= 1000 # seconds to ms
224+
ready = await self.socket.poll(timeout)
230225

231226
if ready:
232227
res = await self._recv()

0 commit comments

Comments
 (0)