summaryrefslogtreecommitdiff
path: root/src/saml2/server.py
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2015-05-15 10:52:33 -0700
committerClint Byrum <clint@fewbar.com>2015-05-15 11:52:15 -0700
commit99911f6c4c7d51071f70709e55fabcd2e6853284 (patch)
tree9ae82d0d6c11e05bd9bd152c94993d21f744b252 /src/saml2/server.py
parent4ef44631df5426e0b4808b1c79b51a37eb026a76 (diff)
downloadpysaml2-99911f6c4c7d51071f70709e55fabcd2e6853284.tar.gz
Fix python3 syntax errors
Retains python2.7 compatibility for all files. Fixes only syntax errors, tests still fail on python3 for various reasons.
Diffstat (limited to 'src/saml2/server.py')
-rw-r--r--src/saml2/server.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/saml2/server.py b/src/saml2/server.py
index c6d31699..ce703cd4 100644
--- a/src/saml2/server.py
+++ b/src/saml2/server.py
@@ -119,7 +119,7 @@ class Server(Entity):
elif isinstance(dbspec, basestring):
idb = shelve.open(dbspec, writeback=True)
else: # database spec is a a 2-tuple (type, address)
- #print >> sys.stderr, "DBSPEC: %s" % (dbspec,)
+ #print(>> sys.stderr, "DBSPEC: %s" % (dbspec,))
(typ, addr) = dbspec
if typ == "shelve":
idb = shelve.open(addr, writeback=True)
@@ -288,7 +288,7 @@ class Server(Entity):
policy = Policy()
try:
ast.apply_policy(sp_entity_id, policy, self.metadata)
- except MissingValue, exc:
+ except MissingValue as exc:
if not best_effort:
return self.create_error_response(in_response_to, consumer_url,
exc, sign_response)
@@ -565,7 +565,7 @@ class Server(Entity):
name_id_policy)
logger.debug("construct_nameid: %s => %s" % (userid,
name_id))
- except IOError, exc:
+ except IOError as exc:
response = self.create_error_response(in_response_to,
destination,
sp_entity_id,
@@ -608,7 +608,7 @@ class Server(Entity):
encrypted_advice_attributes=encrypted_advice_attributes,
encrypt_cert=encrypt_cert)
- except MissingValue, exc:
+ except MissingValue as exc:
return self.create_error_response(in_response_to, destination,
sp_entity_id, exc, name_id)
@@ -767,4 +767,4 @@ class Server(Entity):
except KeyError:
pass
- return lid \ No newline at end of file
+ return lid