aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/__main__.py')
-rw-r--r--python/report_ops/__main__.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py
index 3c6732e9..04c1b5de 100644
--- a/python/report_ops/__main__.py
+++ b/python/report_ops/__main__.py
@@ -5,6 +5,7 @@ import datetime
from serenitas.analytics.dates import prev_business_day
from serenitas.utils.db import dbconn
from serenitas.utils.exchange import ExchangeMessage
+from serenitas.analytics.exceptions import MissingDataError
from .sma import SMA
from .cash import CashReport
@@ -87,20 +88,23 @@ if args.cash_reports or args.wire_reports:
get_custodian_download_fun(custodian)(args.date, fund, em=em)
if args.cash_reports:
cash_report = CashReport[custodian]
- cash_report.to_db(args.date, fund)
+ try:
+ cash_report.to_db(args.date, fund)
+ except MissingDataError as e:
+ logger.warning(e)
if args.wire_reports:
wire_report = WireReport[custodian]
- wire_report.to_db(args.date, fund)
+ try:
+ wire_report.to_db(args.date, fund)
+ except MissingDataError as e:
+ logger.warning(e)
if args.isosel_reports:
for fund in ("ISOSEL",):
for report in ("isosel_accrued", "citco_reports"):
- try:
- report = CitcoReport[report](cob, fund)
- report.to_db()
- except ValueError as e:
- logger.warning(e)
+ report = CitcoReport[report](cob, fund)
+ report.to_db()
if args.send_to_custodians:
for account in (