Skip to content

Commit

Permalink
BUG: _lib/messagestream: open log file in binary mode
Browse files Browse the repository at this point in the history
Fixes a failure on Windows.
  • Loading branch information
pv committed Aug 22, 2017
1 parent b788323 commit 9ce5501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scipy/_lib/messagestream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cdef class MessageStream:
fd, filename = tempfile.mkstemp(prefix='scipy-')
os.close(fd)
self._filename = filename.encode(sys.getfilesystemencoding())
self.handle = stdio.fopen(self._filename, "w+")
self.handle = stdio.fopen(self._filename, "wb+")
if self.handle == NULL:
stdio.remove(self._filename)
raise IOError("Failed to open file {0}".format(self._filename))
Expand Down

0 comments on commit 9ce5501

Please sign in to comment.