From 06487ad4913ec1362a4a88c8928ee07ca1f2a03c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Dec 2019 20:45:15 +0530 Subject: [PATCH] Dont use \r\n in logfiles on windows --- src/calibre/srv/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/utils.py b/src/calibre/srv/utils.py index 6a7243598c..666d833dfb 100644 --- a/src/calibre/srv/utils.py +++ b/src/calibre/srv/utils.py @@ -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')