From: Mohamed Larabi Date: Mon, 1 Oct 2012 07:31:51 +0000 (+0200) Subject: PL Leases: check slice_xrn and slice args in get_leases X-Git-Tag: sfa-2.1-16~5 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4583c90d48436ea8f85506eee9633cb6b57f3cbe;p=sfa.git PL Leases: check slice_xrn and slice args in get_leases --- diff --git a/sfa/planetlab/plaggregate.py b/sfa/planetlab/plaggregate.py index b3ae4596..a16bf670 100644 --- a/sfa/planetlab/plaggregate.py +++ b/sfa/planetlab/plaggregate.py @@ -259,6 +259,9 @@ class PlAggregate: def get_leases(self, slice_xrn=None, slice=None, options={}): + if slice_xrn and not slice: + return [] + now = int(time.time()) filter={} filter.update({'clip':now})