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
a little more robust against odd conditions
[sfa.git]
/
sfa
/
trust
/
credential.py
diff --git
a/sfa/trust/credential.py
b/sfa/trust/credential.py
index
775cde9
..
c1e55ee
100644
(file)
--- a/
sfa/trust/credential.py
+++ b/
sfa/trust/credential.py
@@
-268,7
+268,7
@@
class Credential(object):
str = file(filename).read()
# if this is a legacy credential, write error and bail out
str = file(filename).read()
# if this is a legacy credential, write error and bail out
- if str.strip().startswith("-----"):
+ if
isinstance (str, StringTypes) and
str.strip().startswith("-----"):
logger.error("Legacy credentials not supported any more - giving up with %s..."%str[:10])
return
else:
logger.error("Legacy credentials not supported any more - giving up with %s..."%str[:10])
return
else: