From: Tony Mack Date: Wed, 24 Nov 2010 21:50:41 +0000 (-0500) Subject: creds may be a single cred or list of creds X-Git-Tag: sfa-1.0-9~10^2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=96e81a616d98b87cf97dfa0e7b37b997f747f327;p=sfa.git creds may be a single cred or list of creds --- diff --git a/sfa/managers/slice_manager_pl.py b/sfa/managers/slice_manager_pl.py index a888521f..756800ca 100644 --- a/sfa/managers/slice_manager_pl.py +++ b/sfa/managers/slice_manager_pl.py @@ -351,7 +351,10 @@ def get_rspec(api, creds, options): # get hrn of the original caller origin_hrn = options.get('origin_hrn', None) if not origin_hrn: - origin_hrn = Credential(string=creds[0]).get_gid_caller().get_hrn() + if isinstance(creds, list): + origin_hrn = Credential(string=creds[0]).get_gid_caller().get_hrn() + else: + origin_hrn = Credential(string=creds).get_gid_caller().get_hrn() # look in cache first if api.cache and not xrn: