diff options
-rw-r--r-- | gold/scoreboard/.gitignore | 2 | ||||
-rwxr-xr-x | retiolum/scripts/adv_graphgen/parse.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gold/scoreboard/.gitignore b/gold/scoreboard/.gitignore index 657e895d..a533dcf8 100644 --- a/gold/scoreboard/.gitignore +++ b/gold/scoreboard/.gitignore @@ -1,3 +1,5 @@ /plot/ /profile /archive/ +/keys +/modules/active diff --git a/retiolum/scripts/adv_graphgen/parse.py b/retiolum/scripts/adv_graphgen/parse.py index 0bcf42a0..aae69f0f 100755 --- a/retiolum/scripts/adv_graphgen/parse.py +++ b/retiolum/scripts/adv_graphgen/parse.py @@ -26,8 +26,14 @@ def generate_stats(nodes): def delete_unused_nodes(nodes): new_nodes = {} for k,v in nodes.iteritems(): + if v['external-ip'] == "(null)": + continue if v.get('to',[]): new_nodes[k] = v + for k,v in new_nodes.iteritems(): + if not [ i for i in v['to'] if i['name'] in new_nodes]: + #del(new_nodes[k]) + del(k) return new_nodes def merge_edges(nodes): """ merge back and forth edges into one @@ -36,7 +42,7 @@ def merge_edges(nodes): """ for k,v in nodes.iteritems(): for con in v.get('to',[]): - for i,secon in enumerate(nodes[con['name']].get('to',[])): + for i,secon in enumerate(nodes.get(con['name'],{}).get('to',[])): if k == secon['name']: del (nodes[con['name']]['to'][i]) con['bidirectional'] = True |