X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sfa%2Ftrust%2Fcredential.py;h=6f5336d6187a9825bd7ebafe7d674ef297980391;hb=5a6cbf4fa6837c81354b616d4cfa0352ec5367be;hp=c4795cc2e2fa0fb52eb66973bf9fdf4cfb2f2359;hpb=93a10471fd19e79b977b7655acac2fac9bd5e5fe;p=sfa.git diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index c4795cc2..6f5336d6 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -299,7 +299,8 @@ class Credential(object): if string: str = string elif filename: - str = file(filename).read() + with open(filename) as infile: + str = infile.read() # if this is a legacy credential, write error and bail out if isinstance (str, StringType) and str.strip().startswith("-----"):