aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/report_ops/custodians.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py
index c03bcaf1..4524e14f 100644
--- a/python/report_ops/custodians.py
+++ b/python/report_ops/custodians.py
@@ -118,10 +118,14 @@ class NT(Custodian, account="NT"):
@classmethod
def download_reports(cls, date=datetime.date.today()):
em = ExchangeMessage()
- for msg in em.get_msgs(path=["SeleneOps", "Passport"]):
+ for msg in em.get_msgs(
+ path=["SeleneOps", "Passport"], **cls.em_date_filter(em, date)
+ ):
for attach in msg.attachments:
- message_time = attach.last_modified_time.replace(tzinfo=None)
- if attach.name == "Attachment1.pgp" and message_time.date() == date:
+ message_time = attach.last_modified_time.replace(
+ tzinfo=em._account.default_timezone
+ )
+ if attach.name == "Attachment1.pgp":
dest = get_dir(message_time.date(), archived=False)
dest.mkdir(exist_ok=True, parents=True)
with attach.fp as fp:
@@ -166,11 +170,11 @@ class BNY(Custodian, account="BONY2"):
@classmethod
def download_reports(cls, date=datetime.date.today()):
em = ExchangeMessage()
- bowdst_wire_recent = True
for msg in em.get_msgs(
20,
path=["BowdoinOps", "Reports"],
subject__startswith="Document(s) from Reporting",
+ **cls.em_date_filter(em, date),
):
if msg.sender == "notify@bnymellon.com":
for attach in msg.attachments: