diff --git a/tia/bbg/v3api.py b/tia/bbg/v3api.py index 3c4e725..64d5e1b 100644 --- a/tia/bbg/v3api.py +++ b/tia/bbg/v3api.py @@ -68,6 +68,8 @@ def as_value(ele): """ convert the specified element as a python value """ dtype = ele.datatype() # print '%s = %s' % (ele.name(), dtype) + if ele.isNull(): + return None if dtype in (1, 2, 3, 4, 5, 6, 7, 9, 12): # BOOL, CHAR, BYTE, INT32, INT64, FLOAT32, FLOAT64, BYTEARRAY, DECIMAL) return ele.getValue() @@ -838,5 +840,3 @@ def check_for_updates(self, timeout=500): else: logger.info('next(): ignoring event %s' % evt.eventType()) self.check_for_updates(timeout) - -