diff --git a/pysnmp/smi/indices.py b/pysnmp/smi/indices.py index b1771296..f8058785 100644 --- a/pysnmp/smi/indices.py +++ b/pysnmp/smi/indices.py @@ -79,11 +79,7 @@ def nextKey(self, key): keys = self.__keys - if key in keys: - nextIdx = keys.index(key) + 1 - - else: - nextIdx = bisect(keys, key) + nextIdx = bisect(keys, key) if nextIdx < len(keys): return keys[nextIdx]