Skip to content

Commit

Permalink
Uninitialized MibSclarInstance -> noSuchInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
etingof committed Jan 10, 2019
1 parent 51e61f8 commit 039b4e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysnmp/smi/mibs/SNMPv2-SMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ def readTest(self, varBind, **context):

cbFun = context['cbFun']

if name != self.name:
if name != self.name or not self.syntax.isValue:
exc = error.NoSuchInstanceError(name=name, idx=context.get('idx'))
cbFun(varBind, **dict(context, error=exc))
return
Expand Down Expand Up @@ -1744,7 +1744,7 @@ def readGet(self, varBind, **context):

cbFun = context['cbFun']

if name != self.name:
if name != self.name or not self.syntax.isValue:
exc = error.NoSuchInstanceError(name=name, idx=context.get('idx'))
cbFun(varBind, **dict(context, error=exc))
return
Expand Down Expand Up @@ -1803,7 +1803,7 @@ def readTestNext(self, varBind, **context):

cbFun = context['cbFun']

if name >= self.name:
if name >= self.name or not self.syntax.isValue:
nextName = context.get('nextName')
if nextName:
varBind = nextName, exval.noSuchInstance
Expand Down Expand Up @@ -1861,7 +1861,7 @@ def readGetNext(self, varBind, **context):

cbFun = context['cbFun']

if name >= self.name:
if name >= self.name or not self.syntax.isValue:
nextName = context.get('nextName')
if nextName:
varBind = nextName, exval.noSuchInstance
Expand Down

0 comments on commit 039b4e5

Please sign in to comment.