aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/cash.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/cash.py')
-rw-r--r--python/report_ops/cash.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/report_ops/cash.py b/python/report_ops/cash.py
index da8709c4..3bebbc5a 100644
--- a/python/report_ops/cash.py
+++ b/python/report_ops/cash.py
@@ -8,6 +8,8 @@ from .custodians import NT, UMB, BNY, SCOTIA
from functools import partial
from dataclasses import dataclass
+from selenium.common.exceptions import StaleElementReferenceException
+
from serenitas.utils.env import DAILY_DIR
@@ -142,7 +144,10 @@ class SeleneScotiaCashReport(
self._staging_queue.clear()
def get_cash_report(self, prefix=None):
- self.download_reports(self.date)
+ try:
+ self.download_reports(self.date)
+ except StaleElementReferenceException:
+ raise ValueError(f"File is not ready to download yet")
REPORT_DIR = DAILY_DIR / "Selene" / "Scotia_reports"
try:
return next(