Skip to content

Commit 31f8ce0

Browse files
author
Roland Hedberg
committed
Merge pull request #279 from OlegGirko/fix_python3_support
Fix Python 3 support
2 parents 248c629 + 603b7c5 commit 31f8ce0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/saml2/mdstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def __init__(self, onts, attrc, filename=None, cert=None, **kwargs):
589589
self.cert = cert
590590

591591
def get_metadata_content(self):
592-
return open(self.filename).read()
592+
return open(self.filename, 'rb').read()
593593

594594
def load(self):
595595
_txt = self.get_metadata_content()

tests/idp_conf_sp_no_encrypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# }
3737
}
3838
},
39-
"subject_data": full_path("subject_data.db"),
39+
"subject_data": full_path("subject_data_3.db"),
4040
#"domain": "umu.se",
4141
#"name_qualifier": ""
4242
},

tests/idp_conf_verify_cert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def verify_encrypt_cert(cert_str):
4545
# }
4646
}
4747
},
48-
"subject_data": full_path("subject_data.db"),
48+
"subject_data": full_path("subject_data_2.db"),
4949
#"domain": "umu.se",
5050
#"name_qualifier": ""
5151
},

tests/test_12_s_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_status_from_tuple():
106106
def test_status_from_tuple_empty_message():
107107
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
108108
status_text = "%s" % stat
109-
assert status_text == ERROR_STATUS_EMPTY
109+
assert status_text in (ERROR_STATUS_EMPTY, ERROR_STATUS_NO_HEADER_EMPTY)
110110

111111

112112
def test_attribute_sn():

0 commit comments

Comments
 (0)