From: Tony Mack Date: Thu, 10 Jan 2013 19:50:04 +0000 (-0500) Subject: fix potential KeyError X-Git-Tag: sfa-2.1-23~26^2^2 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=88a05cd0cbc248c488f478df7494f2a18aa18837 fix potential KeyError --- 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