Fix progress report

ticket-769
Vadim vtroshchinskiy 2024-10-09 17:43:48 +02:00
parent 5fe0829c26
commit fcbe1e9561
1 changed files with 2 additions and 2 deletions

View File

@ -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)