From e727cc4c22dbab326a10ca0a43590af0ebd6d509 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 Dec 2020 13:45:06 +0000 Subject: [PATCH] String --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 120a0239..84c001a2 100644 --- a/utils.py +++ b/utils.py @@ -33,11 +33,11 @@ def isDormant(baseDir: str, nickname: str, domain: str, actor: str, with open(lastSeenFilename, 'r') as lastSeenFile: daysSinceEpochStr = lastSeenFile.read() - daysSinceEpoch = int(daysSinceEpoch) + daysSinceEpoch = int(daysSinceEpochStr) currTime = datetime.datetime.utcnow() currDaysSinceEpoch = (currTime - datetime.datetime(1970, 1, 1)).days timeDiffMonths = \ - int((currDaysSinceEpoch - daysSinceEpochStr) / 30) + int((currDaysSinceEpoch - daysSinceEpoch) / 30) if timeDiffMonths >= dormantMonths: return True return False