From 810972c3ba8a595eb7fd621b7a90964940a039d0 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Sun, 11 Sep 2011 16:19:36 +0200 Subject: [PATCH] anaconda: try to fix the broken progress bar --- anaconda/gui.py | 2 +- anaconda/yuminstall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/anaconda/gui.py b/anaconda/gui.py index 2572ec9..f4cbf76 100755 --- a/anaconda/gui.py +++ b/anaconda/gui.py @@ -532,7 +532,7 @@ class ProgressWindow: # only update widget if we've changed by 5% or our timeout has # expired curval = self.progress.get_fraction() - newval = float (amount) / self.total + newval = float (amount) / float(self.total) then = self.lastUpdate now = time.time() if newval < 0.998: diff --git a/anaconda/yuminstall.py b/anaconda/yuminstall.py index 305cb46..ff9c7a3 100644 --- a/anaconda/yuminstall.py +++ b/anaconda/yuminstall.py @@ -216,7 +216,7 @@ class AnacondaCallback: self.numpkgs) % {'donepkgs': self.donepkgs, 'numpkgs': self.numpkgs}) - self.progress.set_fraction(float(self.doneSize / self.totalSize)) + self.progress.set_fraction(float(self.doneSize) / float(self.totalSize)) self.progress.processEvents() self.inProgressPo = None