do not fail on non-mac node IDs

This commit is contained in:
Nils Schneider 2012-06-30 16:46:53 +02:00
parent a4086da509
commit a10ad4baf2

View file

@ -63,8 +63,11 @@ class NodeDB:
# consider this MAC as one of the routers
# MACs
if 'gateway' in x and x['label'] == "TT":
router = list(int(i, 16) for i in x['router'].split(":"))
gateway = list(int(i, 16) for i in x['gateway'].split(":"))
try:
router = list(int(i, 16) for i in x['router'].split(":"))
gateway = list(int(i, 16) for i in x['gateway'].split(":"))
except ValueError:
continue
# first byte must only differ in bit 2
if router[0] == gateway[0] | 2: