# IN THE WORK.
#----------------------------------------------------------------------
+from __future__ import print_function
+
from sfa.trust.credential import Credential, append_sub, DEFAULT_CREDENTIAL_LIFETIME
from sfa.util.sfalogging import logger
from sfa.util.sfatime import SFATIME_FORMAT
-from StringIO import StringIO
from xml.dom.minidom import Document, parseString
+from sfa.util.py23 import StringIO
+
HAVELXML = False
try:
from lxml import etree
result += "\nEnd XML\n"
except:
import traceback
- print "exc. Credential.dump_string / XML"
+ print("exc. Credential.dump_string / XML")
traceback.print_exc()
return result
# sounds like this should be __repr__ instead ??
# Produce the ABAC assertion. Something like [ABAC cred: Me.role<-You] or similar
- def get_summary_tostring(self):
+ def pretty_cred(self):
result = "[ABAC cred: " + str(self.get_head())
for tail in self.get_tails():
result += "<-%s" % str(tail)