From a10ad4baf2f7fb6ac89dd42f012cbf9ad2432adc Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 30 Jun 2012 16:46:53 +0200 Subject: [PATCH] do not fail on non-mac node IDs --- nodedb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nodedb.py b/nodedb.py index c43f1c4..bc44002 100644 --- a/nodedb.py +++ b/nodedb.py @@ -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: