1
0
Fork 0
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:
Thomas Waldmann 2015-12-12 22:13:41 +01:00
parent 2e2e145372
commit 2df0bb1f83

View file

@ -264,13 +264,13 @@ def fetch_from_cache(args):
if not data:
raise ConnectionClosed()
data = data.decode('utf-8')
for line in data.splitlines():
for line in data.splitlines(keepends=True):
if line.startswith('$LOG '):
_, level, msg = line.split(' ', 2)
level = getattr(logging, level, logging.CRITICAL) # str -> int
logging.log(level, msg)
logging.log(level, msg.rstrip())
else:
print("Remote: " + line, file=sys.stderr)
sys.stderr.write("Remote: " + line)
if w:
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < 100:
if calls: