From edc004b0ab407ecbe96700711f4c4cb76d1cacdd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Nov 2019 15:16:24 +0000 Subject: [PATCH] Specify months --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 5244a26d8..abb3a0c32 100644 --- a/utils.py +++ b/utils.py @@ -388,12 +388,12 @@ def noOfAccounts(baseDir: str) -> bool: accountCtr+=1 return accountCtr -def noOfActiveAccountsMonthly(baseDir: str) -> bool: +def noOfActiveAccountsMonthly(baseDir: str,months: int) -> bool: """Returns the number of accounts on the system this month """ accountCtr=0 currTime=int(time.time()) - monthSeconds=60*60*24*30 + monthSeconds=60*60*24*30*months for subdir, dirs, files in os.walk(baseDir+'/accounts'): for account in dirs: if '@' in account: