From 88a05cd0cbc248c488f478df7494f2a18aa18837 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 10 Jan 2013 14:50:04 -0500 Subject: [PATCH] fix potential KeyError --- sfa/planetlab/plaggregate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfa/planetlab/plaggregate.py b/sfa/planetlab/plaggregate.py index a16bf670..47c637bc 100644 --- a/sfa/planetlab/plaggregate.py +++ b/sfa/planetlab/plaggregate.py @@ -238,7 +238,8 @@ class PlAggregate: rspec_node['interfaces'].append(interface) if_count+=1 - tags = [PLTag(node_tags[tag_id]) for tag_id in node['node_tag_ids']] + tags = [PLTag(node_tags[tag_id]) for tag_id in node['node_tag_ids']\ + if tag_id in node_tags] rspec_node['tags'] = tags if node['node_id'] in slivers: # add sliver info -- 2.43.0