[yum-commits] urlgrabber/progress.py

skvidal at osuosl.org skvidal at osuosl.org
Fri Nov 6 20:54:16 UTC 2009


 urlgrabber/progress.py |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2de301b4d141e57c2efe6b9ef94218fc1077d0d8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Fri Nov 6 15:52:54 2009 -0500

    if pycurl returns a float('inf') then return something that works

diff --git a/urlgrabber/progress.py b/urlgrabber/progress.py
index dd07c6a..45eb248 100644
--- a/urlgrabber/progress.py
+++ b/urlgrabber/progress.py
@@ -658,6 +658,8 @@ def format_time(seconds, use_hours=0):
     if seconds is None or seconds < 0:
         if use_hours: return '--:--:--'
         else:         return '--:--'
+    elif seconds == float('inf'):
+        return 'Infinite'
     else:
         seconds = int(seconds)
         minutes = seconds / 60


More information about the Yum-commits mailing list