From 83f2427f0d9378eb25c894648873738dea6a97a4 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 16 Jan 2022 01:59:07 +0000 Subject: merged updating and syncing --- src/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util.py') diff --git a/src/util.py b/src/util.py index 3a9d3e8..647f211 100644 --- a/src/util.py +++ b/src/util.py @@ -6,8 +6,8 @@ import os import hashlib import tarfile -DEFAULT_BAR_COLOR = colors.BLACK + colors.BG_CYAN -DEFAULT_BAR_COLOR_RESET = colors.BG_BLACK + colors.CYAN +DEFAULT_BAR_COLOR = colors.BLACK + colors.BG_WHITE +DEFAULT_BAR_COLOR_RESET = colors.BG_BLACK + colors.WHITE def extract_tar(package_path, destination): cmd = f"tar -h --no-overwrite-dir -xvf {package_path} -C {destination}" @@ -37,7 +37,7 @@ def loading_bar(completed, total, text, spaces = columns - (len(count) + len(text)) info = text + "".join([" " for i in range(spaces)]) + count - reset_at = int((completed/total)*len(info)) if total > 0 else 0 + reset_at = int((completed/total)*len(info)) if total > 0 else len(info) info = "".join([info[i] + (reset if i == reset_at else "") for i in range(len(info))]) print(color + info, end="\r") -- cgit v1.2.1