From 35854a52f4a01c66c9a6ce5934cc21e7415541de Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Fri, 10 Feb 2017 18:40:38 +0100 Subject: [PATCH] Added check for when time is not defined yet (NULL) --- homeCheck.py | 0 macLookup.py | 3 +++ 2 files changed, 3 insertions(+) mode change 100644 => 100755 homeCheck.py diff --git a/homeCheck.py b/homeCheck.py old mode 100644 new mode 100755 diff --git a/macLookup.py b/macLookup.py index 103907c..be9d3cd 100755 --- a/macLookup.py +++ b/macLookup.py @@ -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'