From: Esko Kokkonen Date: Sun, 18 Dec 2011 12:13:23 +0000 (+0200) Subject: Don't print zero seconds printouts X-Git-Url: http://git.itanic.dy.fi/?p=emerge-timer;a=commitdiff_plain;h=50eadc5e99cb1931c1558d1bed414d7f7714c041 Don't print zero seconds printouts This means that times that are for example exactly 60 seconds are now just "1 minute" and not "1 minute 0 seconds". --- diff --git a/emerge-timer.py b/emerge-timer.py index b88d80e..af0f255 100755 --- a/emerge-timer.py +++ b/emerge-timer.py @@ -219,11 +219,12 @@ def give_time(time, nocolor=False): pminutes = (green_start + str(minutes) + color_stop + " minutes ") - pseconds = (green_start + str(seconds) + - color_stop + " second ") - if seconds != 1: + if seconds > 0: pseconds = (green_start + str(seconds) + - color_stop + " seconds ") + color_stop + " second ") + if seconds != 1: + pseconds = (green_start + str(seconds) + + color_stop + " seconds ") if nocolor == True: green_start = "\033[32m"