Fix whenago() to show times as integers instead of floats. v2.2_rc74
authorZac Medico <zmedico@gentoo.org>
Thu, 2 Sep 2010 22:08:35 +0000 (15:08 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 2 Sep 2010 22:08:35 +0000 (15:08 -0700)
pym/_emerge/sync/old_tree_timestamp.py

index df55a2b2572fcd6495e4c9603dcca91d36d29983..9b35aedd61bb8b5e15ebedfb5222af7360c1855f 100644 (file)
@@ -40,15 +40,15 @@ def whenago(seconds):
                days = days % 365
 
        if years:
-               out.append(str(years)+"y ")
+               out.append("%dy " % years)
        if days:
-               out.append(str(days)+"d ")
+               out.append("%dd " % days)
        if hrs:
-               out.append(str(hrs)+"h ")
+               out.append("%dh " % hrs)
        if mins:
-               out.append(str(mins)+"m ")
+               out.append("%dm " % mins)
        if sec:
-               out.append(str(sec)+"s ")
+               out.append("%ds " % sec)
 
        return "".join(out).strip()