mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-11-21 22:42:39 +00:00
Code cleanup
This commit is contained in:
1 parent
88ff3a2c23
commit
ef4e1ac8dc
1 file changed
+8
-8
@@ -1439,14 +1439,14 @@ def get_dmarc_reports_from_mailbox(connection: MailboxConnection,
|
|||||||
_since = 1440 # default one day
|
_since = 1440 # default one day
|
||||||
if re.match(r'\d+[mhd]$', since):
|
if re.match(r'\d+[mhd]$', since):
|
||||||
s = re.split(r'(\d+)', since)
|
s = re.split(r'(\d+)', since)
|
||||||
if s[2] == 'm':
|
if s[2] == 'm':
|
||||||
_since = int(s[1])
|
_since = int(s[1])
|
||||||
elif s[2] == 'h':
|
elif s[2] == 'h':
|
||||||
_since = int(s[1])*60
|
_since = int(s[1])*60
|
||||||
elif s[2] == 'd':
|
elif s[2] == 'd':
|
||||||
_since = int(s[1])*60*24
|
_since = int(s[1])*60*24
|
||||||
elif s[2] == 'w':
|
elif s[2] == 'w':
|
||||||
_since = int(s[1])*60*24*7
|
_since = int(s[1])*60*24*7
|
||||||
else:
|
else:
|
||||||
logger.warning("Incorrect format for \'since\' option. \
|
logger.warning("Incorrect format for \'since\' option. \
|
||||||
Provided value:{0}, Expected values:(5m|3h|2d|1w). \
|
Provided value:{0}, Expected values:(5m|3h|2d|1w). \
|
||||||
|
|||||||
Reference in new issue
Block a user