Skip to content

Commit 2be54f3

Browse files
committed
Mention ValueError cause in transmit() docstring.
1 parent baba4a9 commit 2be54f3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

canopen/pdo/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,10 @@ def add_variable(
540540
return var
541541

542542
def transmit(self) -> None:
543-
"""Transmit the message once."""
543+
"""Transmit the message once.
544+
545+
:raises ValueError: When no COB-ID was assigned.
546+
"""
544547
if not self.cob_id:
545548
raise ValueError("A valid COB-ID has not been configured")
546549
self.pdo_node.network.send_message(self.cob_id, self.data)

0 commit comments

Comments
 (0)