aboutsummaryrefslogtreecommitdiffstats
path: root/python/bowdst.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/bowdst.py')
-rw-r--r--python/bowdst.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/bowdst.py b/python/bowdst.py
index b74eafa3..47b6577d 100644
--- a/python/bowdst.py
+++ b/python/bowdst.py
@@ -10,6 +10,7 @@ from serenitas.utils.env import DAILY_DIR
def download_messages(em):
+ bowdst_wire_recent = True
for msg in em.get_msgs(
20,
path=["BowdoinOps", "Reports"],
@@ -22,7 +23,7 @@ def download_messages(em):
fname.startswith("Asset Detail")
or fname.startswith("Net Investment")
or fname.startswith("Settled Cash")
- or fname.startswith("bowdst_wire")
+ or fname.startswith("BowdstWires")
):
date = datetime.datetime.strptime(
fname.split("_")[1].split(".")[0], "%d %b %Y"
@@ -30,7 +31,11 @@ def download_messages(em):
p = DAILY_DIR / str(date) / "Reports" / fname
if not p.parent.exists():
p.parent.mkdir(parents=True, exist_ok=True)
- if not p.exists():
+ if not p.exists() or (
+ fname.startswith("BowdstWires") and bowdst_wire_recent
+ ):
+ if fname.startswith("BowdstWires"):
+ bowdst_wire_recent = False
p.write_bytes(attach.content)