[jhbuild] Fix progress bar width calculation
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] Fix progress bar width calculation
- Date: Mon, 9 Nov 2020 13:57:56 +0000 (UTC)
commit a896cbf404461cab979fa3cd1c83ddf158efe83b
Author: ReneĢ de Hesselle <dehesselle web de>
Date: Sun Nov 8 23:20:51 2020 +0100
Fix progress bar width calculation
Cast the result to integer.
jhbuild/frontends/terminal.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/jhbuild/frontends/terminal.py b/jhbuild/frontends/terminal.py
index 3387e437..0892cec8 100644
--- a/jhbuild/frontends/terminal.py
+++ b/jhbuild/frontends/terminal.py
@@ -146,7 +146,7 @@ class TerminalBuildScript(buildscript.BuildScript):
progress = 1
columns = curses.tigetnum('cols')
- width = columns / 2
+ width = int(columns / 2)
num_hashes = int(round(progress * width))
progress_bar = '[' + (num_hashes * '=') + ((width - num_hashes) * '-') + ']'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]