aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Schneider <nils@nilsschneider.net>2014-05-31 14:53:28 +0200
committerNils Schneider <nils@nilsschneider.net>2014-05-31 14:53:38 +0200
commitf18d0b38a915cc79a6efe147cf498329d9882461 (patch)
treeeffc184c97d5c716a1d7ec173af9e9ffd5e23a25
parent26fc2a9aef905b0ce32c8a93cc99a4fda15d597d (diff)
bugs
-rw-r--r--.gitignore1
-rwxr-xr-xalfred.py2
-rwxr-xr-xbat2nodes.py2
-rwxr-xr-xbatman.py2
-rw-r--r--nodedb.py3
5 files changed, 7 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 35a04d9..0f42dec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.pyc
aliases.json
+nodedb/
diff --git a/alfred.py b/alfred.py
index 63296c9..6d926bb 100755
--- a/alfred.py
+++ b/alfred.py
@@ -38,5 +38,5 @@ class alfred:
if __name__ == "__main__":
ad = alfred()
- al = ad.alias()
+ al = ad.aliases()
print(al)
diff --git a/bat2nodes.py b/bat2nodes.py
index 8e6d738..921b548 100755
--- a/bat2nodes.py
+++ b/bat2nodes.py
@@ -49,7 +49,7 @@ if options['mesh']:
bm = batman(mesh_interface)
db.parse_vis_data(bm.vis_data(options['alfred']))
for gw in bm.gateway_list():
- db.mark_gateways(gw.mac)
+ db.mark_gateways(gw['mac'])
else:
bm = batman()
db.parse_vis_data(bm.vis_data(options['alfred']))
diff --git a/batman.py b/batman.py
index fac2a9e..c9b3db6 100755
--- a/batman.py
+++ b/batman.py
@@ -59,6 +59,8 @@ class batman:
gw.append({'mac': own_mac, 'bandwidth': gw_mode['bandwidth']})
for line in lines:
gw_line = line.split()
+ if (gw_line[0] == 'No'):
+ continue
# When in client gateway mode maybe gw_line[0] is not the right.
gw.append({'mac':gw_line[0], 'bandwidth': gw_line[-1]})
return gw
diff --git a/nodedb.py b/nodedb.py
index 25c0e8c..fa9caed 100644
--- a/nodedb.py
+++ b/nodedb.py
@@ -182,7 +182,7 @@ class NodeDB:
if 'name' in alias:
node.name = alias['name']
- if 'vpn' in alias and alias['vpn']:
+ if 'vpn' in alias and alias['vpn'] and mac and node.interfaces and mac in node.interfaces:
node.interfaces[mac].vpn = True
if 'gps' in alias:
@@ -202,6 +202,7 @@ class NodeDB:
try:
node = self.maybe_node_by_mac((gateway, ))
except:
+ print("WARNING: did not find gateway '",gateway,"' in node list")
continue
node.flags['gateway'] = True