From: Tony Mack Date: Thu, 9 Feb 2012 00:40:25 +0000 (-0500) Subject: get_rspec() should return an empty rspec when the slice has no nodes X-Git-Tag: sfa-2.1-3~10^2~16 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cb264fca8adcf75383e86acffd78f853b50345c2;p=sfa.git get_rspec() should return an empty rspec when the slice has no nodes --- diff --git a/sfa/plc/plaggregate.py b/sfa/plc/plaggregate.py index 1cace7a9..55e6291e 100644 --- a/sfa/plc/plaggregate.py +++ b/sfa/plc/plaggregate.py @@ -136,6 +136,11 @@ class PlAggregate: return (slice, slivers) def get_nodes_and_links(self, slice=None,slivers=[], options={}): + # if we are dealing with a slice that has no node just return + # and empty list + if slice is not None and not slice['node_ids']: + return ([],[]) + filter = {} tags_filter = {} if slice and 'node_ids' in slice and slice['node_ids']: