diff --git a/pyagentx/network.py b/pyagentx/network.py index 9711398..9074649 100644 --- a/pyagentx/network.py +++ b/pyagentx/network.py @@ -117,8 +117,10 @@ def _get_next_oid(self, oid, endoid): for i in range(len(tlist)): try: sok = int(slist[i]) <= int(tlist[i]) + if not sok: + break eok = int(elist[i]) >= int(tlist[i]) - if not ( sok and eok ): + if not eok: break except IndexError: pass