From 38939635530223ef7d736c19c9c2d666c67baca4 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 2 Feb 2013 01:25:02 +0100 Subject: [PATCH] fix file format generated by ffhlwiki.py --- ffhlwiki.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffhlwiki.py b/ffhlwiki.py index ce4d3cb..c1ba01e 100755 --- a/ffhlwiki.py +++ b/ffhlwiki.py @@ -45,7 +45,7 @@ def import_wikigps(url): nodes = fetch_wikitable(url) - aliases = [] + aliases = {} for node in nodes: try: @@ -68,7 +68,7 @@ def import_wikigps(url): for data in nodes: alias = {} - alias['mac'] = data[0].strip() + mac = data[0].strip() if data[1]: alias['gps'] = data[1].strip() @@ -76,7 +76,7 @@ def import_wikigps(url): if data[2]: alias['name'] = data[2].strip() - aliases.append(alias) + aliases[mac] = alias return aliases