]> git.itanic.dy.fi Git - emerge-timer/commitdiff
minor fixing
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Fri, 26 Aug 2011 15:40:33 +0000 (18:40 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Fri, 26 Aug 2011 15:40:33 +0000 (18:40 +0300)
emerge-timer.py

index 1333c27a3673062c28cb667b0bf2a04fd5fd2fff..40e73cb32f8d618044f04ddcc0650b5a3737ae98 100755 (executable)
@@ -51,6 +51,7 @@ class package:
                   self.date(p[2]))
         print('-'*90 + "\n" + "Package " + green_start + self.name + color_stop +
               " emerged " + str(len(self.versions)) + " times.")
+        print
 
 
     def print_min_max_ave(self):
@@ -61,7 +62,7 @@ class package:
               "\nMin time: \t" + self.time(max_min[1]) +
               "\nAverage time: \t" + self.time(ave_total[0]) +
               "\nIn total spent " + self.time(ave_total[1]) +
-              " emerging " + self.name)
+              " emerging " + green_start + self.name + color_stop)
 
     def time(self, time):
 
@@ -83,23 +84,23 @@ class package:
         if days > 0:
             pdays = (green_start + str(days) + color_stop + " day ")
             if days != 1:
-                pdays += "s"
+                pdays = (green_start + str(days) + color_stop + " days ")
 
         if hours > 0:
             phours = (green_start + str(hours) + color_stop + " hour ")
             if hours != 1:
-                phours += "s"
+                phours = (green_start + str(hours) + color_stop + " hours ")
 
         if minutes > 0:
             pminutes = (green_start + str(minutes) + color_stop + " minute ")
             if minutes != 1:
-                pminutes += "s"
+                pminutes = (green_start + str(minutes) + color_stop + " minutes ")
 
         pseconds = (green_start + str(seconds) + color_stop + " second ")
         if seconds != 1:
-            pseconds += "s"
+            pseconds = (green_start + str(seconds) + color_stop + " seconds ")
 
-        return (pdays + phours + pminutes + pdays)
+        return (pdays + phours + pminutes + pseconds)
 
 
     def date(self, emerge_date):