mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Dont use \r\n in logfiles on windows
This commit is contained in:
parent
e1fdbd3982
commit
06487ad491
@ -313,7 +313,7 @@ class RotatingStream(object):
|
|||||||
|
|
||||||
def set_output(self):
|
def set_output(self):
|
||||||
if iswindows:
|
if iswindows:
|
||||||
self.stream = share_open(self.filename, 'a')
|
self.stream = share_open(self.filename, 'a', newline='')
|
||||||
else:
|
else:
|
||||||
# see https://bugs.python.org/issue27805
|
# 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')
|
self.stream = open(os.open(self.filename, os.O_WRONLY|os.O_APPEND|os.O_CREAT|os.O_CLOEXEC), 'w')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user