From d68b390410c2f3ee0d3e47c95fe556cd29cb3c78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:26:47 -0400 Subject: Use binary mode to save/restore entry_points - no need to mutate newlines --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 13736be5..19a1dfb7 100755 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ class test(_test): return # even though _test.run will raise SystemExit # save the content - with open(entry_points) as f: + with open(entry_points, 'rb') as f: ep_content = f.read() # run the test @@ -78,7 +78,7 @@ class test(_test): _test.run(self) finally: # restore the file - with open(entry_points, 'w') as f: + with open(entry_points, 'wb') as f: f.write(ep_content) -- cgit v1.2.3