aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops')
-rw-r--r--python/report_ops/__main__.py2
-rw-r--r--python/report_ops/admin.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py
index f8c68eee..606150b2 100644
--- a/python/report_ops/__main__.py
+++ b/python/report_ops/__main__.py
@@ -103,8 +103,8 @@ if args.cash_reports or args.wire_reports:
if args.isosel_reports:
for fund in ("ISOSEL",):
for report in ("isosel_accrued", "citco_reports"):
+ report = CitcoReport[report]
try:
- report = CitcoReport[report]
report.to_db(cob, fund)
except MissingDataError as e:
logger.warning(e)
diff --git a/python/report_ops/admin.py b/python/report_ops/admin.py
index 86d8bf02..2cb927b4 100644
--- a/python/report_ops/admin.py
+++ b/python/report_ops/admin.py
@@ -7,6 +7,7 @@ import pandas as pd
from serenitas.utils.remote import SftpClient
from serenitas.utils.db import dawn_engine, dbconn
from serenitas.analytics.dates import next_business_day, prev_business_day
+from serenitas.analytics.exceptions import MissingDataError
_suffix = {"ISOSEL": "IM", "CRSE": "IMCG"}
@@ -84,7 +85,7 @@ class CitcoReport:
df.to_sql(cls.table, dawn_engine, if_exists="append", index=False)
else:
- print(f"{fund}: {cls.table} report not ready for {date}")
+ raise MissingDataError(f"{fund}: {cls.table} report not ready for {date}")
class AccruedReport(