This takes into accout if we have defined green_start as "" globally
and therefore don't need to do that again in the give_time function.
"""Converts time in seconds to human readable form"""
global green_start, color_stop
+ if green_start == "":
+ nocolor = False
+
if nocolor == True:
green_start = ""
color_stop = ""
pseconds = (green_start + str(seconds) +
color_stop + " seconds ")
- green_start = "\033[32m"
- color_stop = "\033[m"
+ if nocolor == True:
+ green_start = "\033[32m"
+ color_stop = "\033[m"
return (pdays + phours + pminutes + pseconds)