Added check for when time is not defined yet (NULL)

This commit is contained in:
2017-02-10 18:40:38 +01:00
parent 7897119322
commit 35854a52f4
2 changed files with 3 additions and 0 deletions

0
homeCheck.py Normal file → Executable file
View File

View File

@@ -41,6 +41,9 @@ def getTimes():
return returnList
def convertTime(seconds):
if not isinstance(seconds, (int, long, float)):
return 'Null'
delta = float("%0.2f" % (time() - seconds))
if delta >= 86400:
return str(delta//86400) + ' days'