On Thu, 13 Aug 2009, James Antill wrote:

---
output.py |    2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/output.py b/output.py
index 74a7ce2..60c1dcf 100755
--- a/output.py
+++ b/output.py
@@ -1161,6 +1161,8 @@ to exit.
        tl = urlgrabber.progress.TerminalLine(8)
        self.verbose_logger.log(logginglevels.INFO_2, "-" * tl.rest())
        dl_time = time.time() - download_start_timestamp
+        if dl_time <= 0: # This stops divide by zero, among other problems
+            dl_time = 0.01
        ui_size = tl.add(' | %5sB' % self.format_number(remote_size))
        ui_time = tl.add(' %9s' % self.format_time(dl_time))
        ui_end  = tl.add(' ' * 5)

ACK - but just so we're clear if the download time is ever LESS than zero then there are OTHER PROBLEMS. :)

-sv

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to