From eba95718cb6ac4af77e6dfe2b8d0136b0c276d6f Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Mon, 4 Jun 2012 19:02:12 +0200 Subject: [PATCH] bugfix --- nodedb.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodedb.py b/nodedb.py index 9e13a3e..1aebf74 100644 --- a/nodedb.py +++ b/nodedb.py @@ -190,11 +190,12 @@ class NodeDB: macs = [s for s in [s.strip() for s in node['MAC'].split(',')] if s] gps = [s for s in [s.strip() for s in node['GPS'].split(',')] if s] + zipped = zip(macs, gps) + if 'Nick' in node: names = [s for s in [s.strip() for s in node['Nick'].split(',')] if s] - zipped = zip(macs, gps, names) - else: - zipped = zip(macs, gps) + if names: + zipped = zip(macs, gps, names) for pair in zipped: try: