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
some odd code was obviously broken, it was using a str variable and then
[sfa.git]
/
sfa
/
trust
/
credential.py
diff --git
a/sfa/trust/credential.py
b/sfa/trust/credential.py
index
92c114e
..
8a6c0bb
100644
(file)
--- a/
sfa/trust/credential.py
+++ b/
sfa/trust/credential.py
@@
-286,21
+286,19
@@
class Credential(object):
self.version = cred['geni_version']
if string or filename:
self.version = cred['geni_version']
if string or filename:
- if string:
- str = string
- elif filename:
+ if not string:
with open(filename) as infile:
with open(filename) as infile:
- str = infile.read()
+ str
ing
= infile.read()
# if this is a legacy credential, write error and bail out
# if this is a legacy credential, write error and bail out
- if isinstance(str
, str) and str
.strip().startswith("-----"):
+ if isinstance(str
ing, str) and string
.strip().startswith("-----"):
logger.error(
"Legacy credentials not supported any more "
"- giving up with {}..."
.format(str[:10]))
return
else:
logger.error(
"Legacy credentials not supported any more "
"- giving up with {}..."
.format(str[:10]))
return
else:
- self.xml = str
+ self.xml = str
ing
self.decode()
# not strictly necessary but won't hurt either
self.get_xmlsec1_path()
self.decode()
# not strictly necessary but won't hurt either
self.get_xmlsec1_path()