diff --git a/pyagentx/network.py b/pyagentx/network.py index 9711398..1982fd1 100644 --- a/pyagentx/network.py +++ b/pyagentx/network.py @@ -117,11 +117,16 @@ def _get_next_oid(self, oid, endoid): for i in range(len(tlist)): try: sok = int(slist[i]) <= int(tlist[i]) + except IndexError: + #sok = True, on most recent successful comparison + pass + try: eok = int(elist[i]) >= int(tlist[i]) - if not ( sok and eok ): - break except IndexError: + #eok = True, on most recent successful comparison pass + if not ( sok and eok ): + break if sok and eok: return tmp_oid return None # No match!