From 1244961c3fb0c76289bc94c6b66da7474838c556 Mon Sep 17 00:00:00 2001 From: elie Date: Sat, 12 Dec 2015 15:48:47 +0000 Subject: all SNMP counters now incremented via '+= 1' rather than 'x = x + 1' --- pysnmp/entity/engine.py | 2 +- pysnmp/entity/rfc3413/ntfrcv.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pysnmp/entity') diff --git a/pysnmp/entity/engine.py b/pysnmp/entity/engine.py index a3036fd0..cce2503b 100644 --- a/pysnmp/entity/engine.py +++ b/pysnmp/entity/engine.py @@ -119,7 +119,7 @@ class SnmpEngine: pass try: - snmpEngineBoots.syntax = snmpEngineBoots.syntax + 1 + snmpEngineBoots.syntax += 1 except: snmpEngineBoots.syntax = snmpEngineBoots.syntax.clone(1) diff --git a/pysnmp/entity/rfc3413/ntfrcv.py b/pysnmp/entity/rfc3413/ntfrcv.py index 1a27222c..da3734e5 100644 --- a/pysnmp/entity/rfc3413/ntfrcv.py +++ b/pysnmp/entity/rfc3413/ntfrcv.py @@ -78,7 +78,7 @@ class NotificationReceiver: except error.StatusInformation: debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, statusInformation %s' % (stateReference, sys.exc_info()[1])) snmpSilentDrops, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpSilentDrops') - snmpSilentDrops.syntax = snmpSilentDrops.syntax + 1 + snmpSilentDrops.syntax += 1 elif PDU.tagSet in rfc3411.unconfirmedClassPDUs: pass -- cgit v1.2.1