From ba47690a030ab9c0008a4eb229413c01d1f5a477 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 16 Jun 2013 00:23:44 +0200 Subject: always read files in binary mode --- test/tutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/tutils.py') diff --git a/test/tutils.py b/test/tutils.py index 1a1c8724..fbce615a 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -20,7 +20,7 @@ def tresp(req=None): req = treq() headers = flow.ODictCaseless() headers["header_response"] = ["svalue"] - cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert")).read()) + cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert"),"rb").read()) resp = flow.Response(req, (1, 1), 200, "message", headers, "content_response", cert) resp.reply = controller.DummyReply() return resp -- cgit v1.2.3