mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 06:03:10 +02:00
Open the log file in shared mode
This commit is contained in:
parent
e200792884
commit
8f9229cab4
1 changed files with 2 additions and 1 deletions
|
|
@ -24,6 +24,7 @@
|
|||
from calibre.utils.localization import get_translator
|
||||
from calibre.utils.socket_inheritance import set_socket_inherit
|
||||
from calibre.utils.logging import ThreadSafeLog
|
||||
from calibre.utils.shared_file import share_open
|
||||
|
||||
HTTP1 = 'HTTP/1.0'
|
||||
HTTP11 = 'HTTP/1.1'
|
||||
|
|
@ -307,7 +308,7 @@ def __init__(self, filename, max_size=None, history=5):
|
|||
self.set_output()
|
||||
|
||||
def set_output(self):
|
||||
self.stream = lopen(self.filename, 'ab', 1) # line buffered
|
||||
self.stream = share_open(self.filename, 'ab', 1) # line buffered
|
||||
try:
|
||||
self.current_pos = self.stream.tell()
|
||||
except EnvironmentError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue