X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fsenslab%2Fslabaggregate.py;h=1b190e7d0bc256dc132556b75170394f7acdecd3;hb=927c8faba297921a2ba494d0c3feb4c02eaa8b2f;hp=040c54f19beb2042fe0337ee5b665e42d6fce16a;hpb=b1912b2d1ccf1e3704650e56be0f2348d05dd372;p=sfa.git diff --git a/sfa/senslab/slabaggregate.py b/sfa/senslab/slabaggregate.py index 040c54f1..1b190e7d 100644 --- a/sfa/senslab/slabaggregate.py +++ b/sfa/senslab/slabaggregate.py @@ -24,7 +24,7 @@ from sfa.rspecs.version_manager import VersionManager from sfa.util.sfatime import datetime_to_epoch def hostname_to_hrn(root_auth,login_base,hostname): - return PlXrn(auth=root_auth,hostname=login_base+'_'+hostname).get_hrn() + return PlXrn(auth=root_auth,hostname=login_base + '_'+hostname).get_hrn() class SlabAggregate: @@ -175,9 +175,12 @@ class SlabAggregate: # assumes that sites, interfaces and tags have already been prepared. #site = sites_dict[node['site_id']] - if node['posx'] and node['posy']: - location = Location({'longitude':node['posx'], 'latitude': node['posy']}) - rspec_node['location'] = location + try: + if node['posx'] and node['posy']: + location = Location({'longitude':node['posx'], 'latitude': node['posy']}) + rspec_node['location'] = location + except KeyError: + pass #rspec_node['interfaces'] = [] #if_count=0 #for if_id in node['interface_ids']: