From 06f75748b67dc3e4fd47c4410eb097d320c69d08 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 17 Feb 2022 20:59:31 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/copy.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index d58b6060..0f39b495 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py @@ -203,6 +203,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry): last_list = f'{json_line["status"]} {json_line["path"]}' last_list_time = datetime.now() progress.set_description(last_list, refresh=False) + if not stderr.isatty(): + print(last_list, file=stderr) elif (json_line['type'] == 'log_message' or json_line['type'] == 'progress_message' or json_line['type'] == 'progress_percent') and ('message' in json_line or 'msgid' in json_line): if 'message' in json_line: tqdm.write(t + json_line['message']) -- cgit v1.2.3