aboutsummaryrefslogtreecommitdiffstats
path: root/python/insert_fx_id.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/insert_fx_id.py')
-rw-r--r--python/insert_fx_id.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/python/insert_fx_id.py b/python/insert_fx_id.py
index 827cb319..c9cbe26b 100644
--- a/python/insert_fx_id.py
+++ b/python/insert_fx_id.py
@@ -39,9 +39,14 @@ def get_tag(fund):
def read_BAMSNY(fund, workdate):
REPORTS_DIR = DAILY_DIR / fund / "BoA_reports"
- fname = next(
- REPORTS_DIR.glob(f"301__LMCG_INVESTMEN{get_tag(fund)}_CSA_{workdate:%m%d%Y}_*")
- )
+ try:
+ fname = next(
+ REPORTS_DIR.glob(
+ f"301__LMCG_INVESTMEN{get_tag(fund)}_CSA_{workdate:%m%d%Y}_*"
+ )
+ )
+ except StopIteration:
+ raise FileNotFoundError
df = load_excel_baml(fname)
df = df[df["ProductID"] == "FX_Fwd"]
df = df[