Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions pyagentx/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<len(tlist):
t=int(tlist[i])
if s > t:
ok=False
break
except IndexError:
pass
if sok and eok:
if i<len(elist):
e=int(elist[i])
if t > e:
ok = False
break
if ok:
return tmp_oid
return None # No match!

Expand Down