Skip to content

Commit 9edf10b

Browse files
committed
fix SNAFU caught in review
1 parent e9f64e8 commit 9edf10b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

canopen/node/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def __init__(
2626
self.object_dictionary = object_dictionary
2727

2828
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")
29+
if not 1 <= self.id <= 127:
30+
raise ValueError(f"No valid Node ID provided, {self.id} not in range 1..127")
3131

3232
def has_network(self) -> bool:
3333
"""Check whether the node has been associated to a network."""

0 commit comments

Comments
 (0)