From 3780fb6cb1b28fc7233e0bb9f2121a3f91a0bfaa Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 17 Aug 2014 19:31:14 +0200 Subject: [PATCH] fix rrd.py for real --- rrd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rrd.py b/rrd.py index 2a03026..6f48913 100755 --- a/rrd.py +++ b/rrd.py @@ -27,11 +27,11 @@ class rrd: os.mkdir(self.imagePath) def update_database(self,db): - nodes = {} - clientCount = sum(map(lambda d: d.clientcount, db.get_nodes())) + nodes = db.get_nodes() + clientCount = sum(map(lambda d: d.clientcount, nodes)) self.globalDb.update(len(nodes), clientCount) - for node in nodes.values(): + for node in nodes: rrd = NodeRRD( os.path.join(self.dbPath, str(node.id).replace(':', '') + '.rrd'), node