mirror of
https://github.com/meshtastic/python.git
synced 2026-06-18 04:20:05 -04:00
Fix an issue in to_node_num and add a bunch of tests to it as well
This commit is contained in:
@@ -728,7 +728,7 @@ def to_node_num(node_id: Union[int, str]) -> int:
|
||||
return node_id
|
||||
s = str(node_id).strip()
|
||||
if s.startswith("!"):
|
||||
s = s[1:]
|
||||
s = "0x" + s[1:]
|
||||
if s.lower().startswith("0x"):
|
||||
return int(s, 16)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user