From 873a81f31f87c8273548764f3964ee1fa2b45cc7 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Sat, 21 Aug 2010 01:04:41 +0000 Subject: [PATCH] getDelegatedCred returns a single credential or None, not a list of credentials. --- sfa/plc/api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 380ca6b4..25df830a 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -137,8 +137,12 @@ class SfaAPI(BaseAPI): Attempt to find a credential delegated to us in the specified list of creds. """ - if creds and not isinstance(creds, list): creds = [creds] - return filter_creds_by_caller(creds,self.hrn) + if creds and not isinstance(creds, list): + creds = [creds] + delegated_creds = filter_creds_by_caller(creds,self.hrn) + if not delegated_creds: + return None + return delegated_creds[0] def getCredentialFromRegistry(self): """ -- 2.43.0