We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9f64e8 commit 9edf10bCopy full SHA for 9edf10b
1 file changed
canopen/node/base.py
@@ -26,8 +26,8 @@ def __init__(
26
self.object_dictionary = object_dictionary
27
28
self.id = node_id or object_dictionary.node_id or 0
29
- if not self.id or not 1 <= self.id <= 127:
30
- raise ValueError("No valid Node ID provided, %r not in range 1..127")
+ if not 1 <= self.id <= 127:
+ raise ValueError(f"No valid Node ID provided, {self.id} not in range 1..127")
31
32
def has_network(self) -> bool:
33
"""Check whether the node has been associated to a network."""
0 commit comments