diff --git a/metrik/tasks/bloomberg.py b/metrik/tasks/bloomberg.py index 89aa271..9e79d27 100644 --- a/metrik/tasks/bloomberg.py +++ b/metrik/tasks/bloomberg.py @@ -22,7 +22,13 @@ class BloombergEquityInfo(Task): class EquityInfoParser(HTMLParser): def __init__(self, keys): - super(EquityInfoParser, self).__init__() + # This call isn't safe because python 2 HTMLParser is an + # old-style class + try: + super(EquityInfoParser, self).__init__() + except TypeError: + pass + self.keys = keys self.records = {k: None for k in keys} self.do_record = {k: False for k in keys}