git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf4711f
)
getDelegatedCred returns a single credential or None, not a list of credentials.
author
Tony Mack
<tmack@cs.princeton.edu>
Sat, 21 Aug 2010 01:04:41 +0000
(
01:04
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Sat, 21 Aug 2010 01:04:41 +0000
(
01:04
+0000)
sfa/plc/api.py
patch
|
blob
|
history
diff --git
a/sfa/plc/api.py
b/sfa/plc/api.py
index
380ca6b
..
25df830
100644
(file)
--- 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.
"""
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):
"""
def getCredentialFromRegistry(self):
"""