aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/custodians.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/custodians.py')
-rw-r--r--python/report_ops/custodians.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py
index babbf85d..288f81f6 100644
--- a/python/report_ops/custodians.py
+++ b/python/report_ops/custodians.py
@@ -2,6 +2,7 @@ import datetime
from typing import ClassVar
from dataclasses import dataclass
import gpg
+from selenium.common.exceptions import StaleElementReferenceException
from serenitas.utils.exchange import ExchangeMessage, FileAttachment
from serenitas.utils.env import DAILY_DIR
@@ -206,4 +207,7 @@ class BNY(Custodian, account="BONY2"):
class SCOTIA(Custodian, account="SCOTIA"):
@staticmethod
def download_reports(date=datetime.date.today()):
- return download_scotia_report(date)
+ try:
+ return download_scotia_report(date)
+ except StaleElementReferenceException:
+ raise ValueError(f"Scotia report not ready yet for {date}")