[Yum-devel] [PATCH 4/9] Use re.total instead of total_size.

Zdeněk Pavlas zpavlas at redhat.com
Mon Sep 26 16:06:20 UTC 2011


Total percentages are calculated in re.fraction_read(), and are relative
to re.last_amount_read and re.total.  Use it also for done/total sizes.
Keep total_size for compatibility.
---
 urlgrabber/progress.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/urlgrabber/progress.py b/urlgrabber/progress.py
index 1de0abd..ecef8ca 100644
--- a/urlgrabber/progress.py
+++ b/urlgrabber/progress.py
@@ -481,7 +481,7 @@ class TextMultiFileMeter(MultiFileMeter):
             tf = self.numfiles or 1
             pf = 100 * float(df)/tf + 0.49
             dd = self.re.last_amount_read
-            td = self.total_size
+            td = self.re.total
             pd = 100 * (self.re.fraction_read() or 0) + 0.49
             dt = self.re.elapsed_time()
             rt = self.re.remaining_time()
-- 
1.7.4.4



More information about the Yum-devel mailing list