diff --git a/pyagentx/network.py b/pyagentx/network.py index 9711398..a98c88a 100644 --- a/pyagentx/network.py +++ b/pyagentx/network.py @@ -114,15 +114,20 @@ def _get_next_oid(self, oid, endoid): elist = endoid.split('.') for tmp_oid in self.data_idx: tlist = tmp_oid.split('.') - for i in range(len(tlist)): - try: - sok = int(slist[i]) <= int(tlist[i]) - eok = int(elist[i]) >= int(tlist[i]) - if not ( sok and eok ): + ok=True + for i in range(len(slist)): + s=int(slist[i] + if i t: + ok=False break - except IndexError: - pass - if sok and eok: + if i e: + ok = False + break + if ok: return tmp_oid return None # No match!