Browse Source

batman: fetch clients+neighbours as MAC, not nodeid

Helge Jung 9 years ago
parent
commit
51cf0d916e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ffstatus/batman.py

+ 2 - 2
ffstatus/batman.py

@@ -71,13 +71,13 @@ class BatmanParser:
 				for neighbour in item['neighbors']:
 					#if neighbour['router'] != item['primary']:
 					#	print('node {0}\'s neighbor {1} has unexpected router {2}'.format(itemid, neighbour['neighbor'], neighbour['router']))
-					neighbours[self.mac2id(neighbour['neighbor'])] = float(neighbour['metric'])
+					neighbours[neighbour['neighbor']] = float(neighbour['metric'])
 
 			# construct dict entry as expected by BATCAVE
 			data[itemid] = {
 				'aliases': aliases,
 				'neighbours': neighbours,
-				'clients': [ self.mac2id(x) for x in item['clients'] ] if 'clients' in item else [],
+				'clients': [ x for x in item['clients'] ] if 'clients' in item else [],
 				'__UPDATED__': { 'batadv': ts, },
 			}