[Yum-devel] [PATCH 01/10] TextMultiFileMeter: minor tweaks

Zdeněk Pavlas zpavlas at redhat.com
Mon Nov 7 10:55:08 UTC 2011


remove _do_end(), because individual finished files were already
handled in end_meter, and _do_update_meter(None) fails.

remove _do_update_meter() at end of _do_end_meter().
we already have bumped finished_files counter, and
_do_update_meter() would report N+1 -th download.
---
 urlgrabber/progress.py |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/urlgrabber/progress.py b/urlgrabber/progress.py
index 3d7e99a..4c126c5 100644
--- a/urlgrabber/progress.py
+++ b/urlgrabber/progress.py
@@ -576,7 +576,6 @@ class TextMultiFileMeter(MultiFileMeter):
             self.fo.write(out)
         finally:
             self._lock.release()
-        self._do_update_meter(meter, now)
 
     def _do_failure_meter(self, meter, message, now):
         self._lock.acquire()
@@ -599,15 +598,6 @@ class TextMultiFileMeter(MultiFileMeter):
             pass
         finally:
             self._lock.release()
-
-    def _do_end(self, now):
-        self._do_update_meter(None, now)
-        self._lock.acquire()
-        try:
-            self.fo.write('\n')
-            self.fo.flush()
-        finally:
-            self._lock.release()
         
 ######################################################################
 # support classes and functions
-- 
1.7.4.4



More information about the Yum-devel mailing list