diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/report_ops/custodians.py | 6 | ||||
| -rw-r--r-- | python/report_ops/wires.py | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py index 2409dbfe..93aba172 100644 --- a/python/report_ops/custodians.py +++ b/python/report_ops/custodians.py @@ -15,6 +15,7 @@ from serenitas.utils.env import DAILY_DIR from serenitas.utils.remote import Client from serenitas.ops.trade_dataclasses import BondDeal from serenitas.ops.funds import Service +from serenitas.analytics.exceptions import MissingDataError from .misc import get_dir, _recipients, _cc_recipients from .scotia import download_scotia_report @@ -185,7 +186,10 @@ def download_bny_reports(date, fund, em): def download_scotia_reports(date, fund, **kwargs): - download_scotia_report(date) + try: + download_scotia_report(date) + except MissingDataError as e: + pass def download_gstx_reports(date, fund, **kwargs): diff --git a/python/report_ops/wires.py b/python/report_ops/wires.py index dbf09af6..094ae967 100644 --- a/python/report_ops/wires.py +++ b/python/report_ops/wires.py @@ -8,6 +8,7 @@ import pandas as pd from serenitas.ops.trade_dataclasses import Deal, Ccy from serenitas.ops.dataclass_mapping import Fund from serenitas.analytics.dates import prev_business_day +from serenitas.analytics.exceptions import MissingDataError from serenitas.utils.env import DAILY_DIR from .misc import get_dir, dt_from_fname, Custodian @@ -55,7 +56,7 @@ class WireReport(Deal, table_name="custodian_wires", deal_type="custodian_wires" default=None, ) if not p: - raise ValueError( + raise MissingDataError( f"No reports found for fund: {prefix.split('_')[-1]} date: {date}" ) return p |
