Add space

main
Bob Mottram 2020-12-13 13:43:09 +00:00
parent 9ed343865d
commit 2127252ca0
3 changed files with 4 additions and 7 deletions

View File

@ -33,14 +33,11 @@ def isDormant(baseDir: str, nickname: str, domain: str, actor: str,
with open(lastSeenFilename, 'r') as lastSeenFile: with open(lastSeenFilename, 'r') as lastSeenFile:
daysSinceEpochStr = lastSeenFile.read() daysSinceEpochStr = lastSeenFile.read()
if not daysSinceEpochStr: daysSinceEpoch = int(daysSinceEpoch)
return False
if not daysSinceEpochStr.isdigit():
return False
currTime = datetime.datetime.utcnow() currTime = datetime.datetime.utcnow()
currDaysSinceEpoch = (currTime - datetime.datetime(1970, 1, 1)).days currDaysSinceEpoch = (currTime - datetime.datetime(1970, 1, 1)).days
timeDiffMonths = \ timeDiffMonths = \
int((currDaysSinceEpoch - int(daysSinceEpochStr)) / 30) int((currDaysSinceEpoch - daysSinceEpochStr) / 30)
if timeDiffMonths >= dormantMonths: if timeDiffMonths >= dormantMonths:
return True return True
return False return False