diff options
Diffstat (limited to 'python/report_ops/__main__.py')
| -rw-r--r-- | python/report_ops/__main__.py | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py index 487954dd..415cfe07 100644 --- a/python/report_ops/__main__.py +++ b/python/report_ops/__main__.py @@ -1,9 +1,11 @@ -from serenitas.analytics.dates import prev_business_day -from serenitas.utils.db import dbconn -from serenitas.utils.exchange import ExchangeMessage import logging import argparse import datetime + +from serenitas.analytics.dates import prev_business_day +from serenitas.utils.db import dbconn +from serenitas.utils.exchange import ExchangeMessage + from .sma import SMA from .cash import CashReport from .admin import CitcoReport @@ -82,12 +84,17 @@ if args.cash_reports: em = ExchangeMessage() for fund, custodians in _fund_custodians.items(): for custodian in custodians: - try: - get_custodian_download_fun(custodian)(args.date, fund, em=em) - cash_report = CashReport[custodian] - cash_report.to_db(args.date, fund) - except ValueError as e: - logger.warning(e) + get_custodian_download_fun(custodian)(args.date, fund, em=em) + cash_report = CashReport[custodian] + cash_report.to_db(args.date, fund) + +if args.wire_reports: + em = ExchangeMessage() + for fund, custodians in _fund_custodians.items(): + for custodian in custodians: + get_custodian_download_fun(custodian)(args.date, fund, em=em) + wire_report = WireReport[custodian] + wire_report.to_db(args.date, fund) if args.isosel_reports: for fund in ( @@ -101,14 +108,6 @@ if args.isosel_reports: except ValueError as e: logger.warning(e) -if args.wire_reports: - for fund, custodians in _fund_custodians.items(): - for custodian in custodians: - try: - Wire[(fund, custodian)].to_db(args.date) - except ValueError as e: - logger.warning(e) - if args.send_to_custodians: for account in ( "BBH", |
