X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Ftrust%2Fcredential.py;h=0aa616213a98631771c34b57c2a7ecafeb85ae97;hp=ee3f7325477a8478a7a197b46f9e20f9c1f61638;hb=915e3b43952aa7bad3b861bf4e01feeb8ab882c4;hpb=9194805e82cb8775d1257ba45b27a368aef9d8b7 diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index ee3f7325..0aa61621 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -579,12 +579,16 @@ class Credential(object): f = filep else: f = open(filename, "w") + if isinstance(self.xml, bytes): + self.xml = self.xml.decode() f.write(self.xml) f.close() def save_to_string(self, save_parents=True): if not self.xml: self.encode() + if isinstance(self.xml, bytes): + self.xml = self.xml.decode() return self.xml def get_refid(self):