From 12ab89371d1c92bde280a117f0920a8fa0b21d1e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:22:15 +0100 Subject: tinc_stats: fix missing has_key --- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py index 37122ee5..9d80e62d 100644 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py +++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py @@ -131,7 +131,7 @@ def print_node(k,v): node = " "+k+"[label=\"" node += k+"\\l" node += "availability: %f\\l" % v['availability'] - if v.has_key('num_conns'): + if 'num_conns' in v: node += "Num Connects:"+str(v['num_conns'])+"\\l" node += "external:"+v['external-ip']+":"+v['external-port']+"\\l" for addr in v.get('internal-ip',['dunno lol']): -- cgit v1.2.3