Sanity check on read length

This commit is contained in:
Alex Forencich
2020-12-01 18:01:34 -08:00
parent b3c1e1d557
commit 0bbad73760

View File

@@ -442,6 +442,9 @@ class AxiMasterRead(object):
raise Exception("Token is not unique")
self.active_tokens.add(token)
if length < 0:
raise ValueError("Read length must be positive")
if arid is None or arid < 0:
arid = None
elif arid > self.id_count: