From 96e81a616d98b87cf97dfa0e7b37b997f747f327 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 24 Nov 2010 16:50:41 -0500 Subject: [PATCH] creds may be a single cred or list of creds --- sfa/managers/slice_manager_pl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.47.0