From: Tony Mack Date: Tue, 18 Dec 2012 16:26:29 +0000 (-0500) Subject: fix potential KeyError X-Git-Tag: sfa-3.0-0~46 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f8142412657e61baf08208944b19838a39479367;hp=38b084acb5b1e64d77fa3427eb02e7090decfb47;p=sfa.git fix potential KeyError --- diff --git a/sfa/planetlab/plaggregate.py b/sfa/planetlab/plaggregate.py index c07d9c82..ef1a5bb9 100644 --- a/sfa/planetlab/plaggregate.py +++ b/sfa/planetlab/plaggregate.py @@ -191,7 +191,7 @@ class PlAggregate: interface['client_id'] = "%s:%s" % (node['node_id'], if_id) 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 return rspec_node