mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-01 01:06:59 +00:00
remote stderr: keep line endings as is
so even the \r trick works for overwriting the same line.
This commit is contained in:
parent
2e2e145372
commit
2df0bb1f83
1 changed files with 3 additions and 3 deletions
|
@ -264,13 +264,13 @@ def fetch_from_cache(args):
|
||||||
if not data:
|
if not data:
|
||||||
raise ConnectionClosed()
|
raise ConnectionClosed()
|
||||||
data = data.decode('utf-8')
|
data = data.decode('utf-8')
|
||||||
for line in data.splitlines():
|
for line in data.splitlines(keepends=True):
|
||||||
if line.startswith('$LOG '):
|
if line.startswith('$LOG '):
|
||||||
_, level, msg = line.split(' ', 2)
|
_, level, msg = line.split(' ', 2)
|
||||||
level = getattr(logging, level, logging.CRITICAL) # str -> int
|
level = getattr(logging, level, logging.CRITICAL) # str -> int
|
||||||
logging.log(level, msg)
|
logging.log(level, msg.rstrip())
|
||||||
else:
|
else:
|
||||||
print("Remote: " + line, file=sys.stderr)
|
sys.stderr.write("Remote: " + line)
|
||||||
if w:
|
if w:
|
||||||
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < 100:
|
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < 100:
|
||||||
if calls:
|
if calls:
|
||||||
|
|
Loading…
Reference in a new issue