Dont use \r\n in logfiles on windows

This commit is contained in:
Kovid Goyal 2019-12-13 20:45:15 +05:30
parent e1fdbd3982
commit 06487ad491
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -313,7 +313,7 @@ class RotatingStream(object):
def set_output(self):
if iswindows:
self.stream = share_open(self.filename, 'a')
self.stream = share_open(self.filename, 'a', newline='')
else:
# see https://bugs.python.org/issue27805
self.stream = open(os.open(self.filename, os.O_WRONLY|os.O_APPEND|os.O_CREAT|os.O_CLOEXEC), 'w')