aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/book_bbg.py2
-rw-r--r--python/trade_dataclasses.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/python/book_bbg.py b/python/book_bbg.py
index 786631ed..7b276c12 100644
--- a/python/book_bbg.py
+++ b/python/book_bbg.py
@@ -33,6 +33,8 @@ def run():
except ValueError as e:
logger.warning(e)
pass
+ except AttributeError:
+ pass
else:
BbgDeal._cache[bbg_id] = None
except (SSHException, OSError):
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index 1baff39d..43c59ade 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -416,6 +416,8 @@ class CDSDeal(
@classmethod
def from_bbg_line(cls, line: dict):
+ if "SEQ#" in line and line["Brkr"] != "BSEF":
+ raise AttributeError(f"Ignoring file, we have an allocation file")
if line["Coupon"] == "":
with cls._conn.cursor() as c:
c.execute(