Commit 390ab4da authored by Leo P. Singer's avatar Leo P. Singer
Browse files

Fix unbound local variable error

parent 09cbfc42
......@@ -334,11 +334,12 @@ def check_vector(cache, channel, start, end, bits, logic_type='all'):
start=start, end=end, bits=bits)
except IndexError:
log.exception('Failed to read from low-latency frame files')
if len(statevector) > 0: # statevector must not be empty
return {bitname.format(channel.split(':')[0], key):
bool(logic_map[logic_type](
value.value if len(value.value) > 0 else None))
for key, value in statevector.get_bit_series().items()}
else:
if len(statevector) > 0: # statevector must not be empty
return {bitname.format(channel.split(':')[0], key):
bool(logic_map[logic_type](
value.value if len(value.value) > 0 else None))
for key, value in statevector.get_bit_series().items()}
# FIXME: figure out how to get access to low-latency frames outside
# of the cluster. Until we figure that out, actual I/O errors have
# to be non-fatal.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment