From 925e2fc12dcc0ef593972651322cb33033f200bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alin=20Tr=C4=83istaru?= Date: Wed, 26 Apr 2017 13:59:17 +0300 Subject: [PATCH] reduce redundant function calls --- scripts/install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install.py b/scripts/install.py index 3d56b02..e12aa25 100644 --- a/scripts/install.py +++ b/scripts/install.py @@ -140,9 +140,8 @@ def install_progress(): thrd.start() pbar = progressbar.ProgressBar(maxval=100).start() # bar = progressbar.ProgressBar(redirect_stdout=True) while thrd.is_alive(): - current_size = details(config.usb_disk)['size_used'] + current_size = shutil.disk_usage(usb_details['mount_point'])[1] percentage = int((current_size / final_size) * 100) -# log("Install at " + str(percentage) + "%") if percentage > 100: percentage = 100 config.percentage = percentage