From cb264fca8adcf75383e86acffd78f853b50345c2 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 8 Feb 2012 19:40:25 -0500 Subject: [PATCH] get_rspec() should return an empty rspec when the slice has no nodes --- sfa/plc/plaggregate.py | 5 +++++ 1 file changed, 5 insertions(+) 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']: -- 2.47.0