diff options
Diffstat (limited to 'pysnmp/proto/api/v1.py')
-rw-r--r-- | pysnmp/proto/api/v1.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pysnmp/proto/api/v1.py b/pysnmp/proto/api/v1.py index 1f968986..37882859 100644 --- a/pysnmp/proto/api/v1.py +++ b/pysnmp/proto/api/v1.py @@ -66,7 +66,8 @@ class PDUAPI(object): pdu.setComponentByPosition( 2, self._errorIndex, verifyConstraints=False, matchTags=False, matchConstraints=False ) - pdu.setComponentByPosition(3) + varBindList = pdu.setComponentByPosition(3).getComponentByPosition(3) + varBindList.clear() @staticmethod def getRequestID(pdu): @@ -170,7 +171,8 @@ class TrapPDUAPI(object): pdu.setComponentByPosition(2, self._genericTrap, verifyConstraints=False, matchTags=False, matchConstraints=False) pdu.setComponentByPosition(3, self._zeroInt, verifyConstraints=False, matchTags=False, matchConstraints=False) pdu.setComponentByPosition(4, self._zeroTime, verifyConstraints=False, matchTags=False, matchConstraints=False) - pdu.setComponentByPosition(5) + varBindList = pdu.setComponentByPosition(5).getComponentByPosition(5) + varBindList.clear() @staticmethod def getEnterprise(pdu): |