Skip to content

Commit

Permalink
Lint nits
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Aug 29, 2023
1 parent c1a7c71 commit d5216e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pycyphal/transport/can/_session/_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _PendingFeedbackKey:


# noinspection PyAbstractClass
class CANOutputSession(CANSession, pycyphal.transport.OutputSession):
class CANOutputSession(CANSession, pycyphal.transport.OutputSession): # pylint: disable=abstract-method
"""
This is actually an abstract class, but its concrete inheritors are hidden from the API.
The implementation is chosen according to the type of the session requested: broadcast or unicast.
Expand Down
4 changes: 2 additions & 2 deletions pycyphal/transport/can/media/socketcan/_socketcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ async def send(self, frames: typing.Iterable[Envelope], monotonic_deadline: floa
loop.sock_sendall(self._sock, self._compile_native_frame(f.frame)),
timeout=monotonic_deadline - loop.time(),
)
except asyncio.TimeoutError:
break
except OSError as err:
if self._closed: # https://github.com/OpenCyphal/pycyphal/issues/204
break
Expand All @@ -152,8 +154,6 @@ async def send(self, frames: typing.Iterable[Envelope], monotonic_deadline: floa
) from err
self._closed = self._closed or err.errno in self._errno_unrecoverable
raise err
except asyncio.TimeoutError:
break
else:
num_sent += 1
return num_sent
Expand Down

0 comments on commit d5216e6

Please sign in to comment.