From fcbe1e9561e31c89a8e48517d7a45bbd640c42ea Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Wed, 9 Oct 2024 17:43:48 +0200 Subject: [PATCH] Fix progress report --- gitlib/gitlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index d5b70f2..36ee7ea 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -67,11 +67,11 @@ class OgProgressPrinter(git.RemoteProgress): def update(self, op_code, cur_count, max_count=None, message=""): self.logger.debug(f"Progress: {op_code} {cur_count}/{max_count}: {message}") - status_string = "Progress: %s %d/%d: %s" % (op_code, cur_count, max_count, message) + status_string = "Progress: %s %s/%s: %s" % (op_code, cur_count, max_count, message) padded_string = status_string.rjust(self.prev_len, " ") self.prev_len = len(status_string) - print(f"\r{padded_string}", file=sys.stderr) + print(f"\r{padded_string}", file=sys.stderr, end="") def __del__(self): print("\n", file=sys.stderr)