RSpecVersion.todict() needs to turn values() into a list()
[sfa.git] / sfa / trust / speaksfor_util.py
index 9bad61d..8317822 100644 (file)
@@ -31,7 +31,6 @@ import subprocess
 import sys
 import tempfile
 from xml.dom.minidom import *
-from StringIO import StringIO
 
 from sfa.util.sfatime import SFATIME_FORMAT
 
@@ -41,6 +40,7 @@ from sfa.trust.abac_credential import ABACCredential, ABACElement
 from sfa.trust.credential_factory import CredentialFactory
 from sfa.trust.gid import GID
 from sfa.util.sfalogging import logger
+from sfa.util.py23 import StringIO
 
 # Routine to validate that a speaks-for credential 
 # says what it claims to say:
@@ -211,14 +211,14 @@ def verify_speaks_for(cred, tool_gid, speaking_for_urn,
         # User certificate must validate against trusted roots
         try:
             user_gid.verify_chain(trusted_roots)
-        except Exception, e:
+        except Exception as e:
             return False, None, \
                 "Cred signer (user) cert not trusted: %s" % e
 
         # Tool certificate must validate against trusted roots
         try:
             tool_gid.verify_chain(trusted_roots)
-        except Exception, e:
+        except Exception as e:
             return False, None, \
                 "Tool cert not trusted: %s" % e