git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2to3 -f has_key
[sfa.git]
/
sfa
/
trust
/
credential_factory.py
diff --git
a/sfa/trust/credential_factory.py
b/sfa/trust/credential_factory.py
index
a51673e
..
cf5a8fb
100644
(file)
--- a/
sfa/trust/credential_factory.py
+++ b/
sfa/trust/credential_factory.py
@@
-69,7
+69,7
@@
class CredentialFactory:
# Try to treat the file as JSON, getting the cred_type from the struct
try:
credO = json.loads(credString, encoding='ascii')
# Try to treat the file as JSON, getting the cred_type from the struct
try:
credO = json.loads(credString, encoding='ascii')
- if
credO.has_key('geni_value') and credO.has_key('geni_type')
:
+ if
'geni_value' in credO and 'geni_type' in credO
:
cred_type = credO['geni_type']
credString = credO['geni_value']
except Exception as e:
cred_type = credO['geni_type']
credString = credO['geni_value']
except Exception as e: