summaryrefslogtreecommitdiff
path: root/pysnmp/entity
diff options
context:
space:
mode:
authorelie <elie>2015-10-17 15:34:21 +0000
committerelie <elie>2015-10-17 15:34:21 +0000
commit7ebcb3d0c1ce6b7722bf7b06b4826d27c2fa487b (patch)
tree8cdd9f0b8d08d4af24ff7ade9ead79285c037105 /pysnmp/entity
parent71dd5565a4b2948237a87319b57c565e18605761 (diff)
downloadpysnmp-git-7ebcb3d0c1ce6b7722bf7b06b4826d27c2fa487b.tar.gz
multiple-statements-in-one-line linted out
Diffstat (limited to 'pysnmp/entity')
-rw-r--r--pysnmp/entity/rfc3413/cmdrsp.py3
-rw-r--r--pysnmp/entity/rfc3413/ntfrcv.py3
-rw-r--r--pysnmp/entity/rfc3413/oneliner/ntforg.py25
3 files changed, 22 insertions, 9 deletions
diff --git a/pysnmp/entity/rfc3413/cmdrsp.py b/pysnmp/entity/rfc3413/cmdrsp.py
index 91a8dfbb..2e811b7f 100644
--- a/pysnmp/entity/rfc3413/cmdrsp.py
+++ b/pysnmp/entity/rfc3413/cmdrsp.py
@@ -328,7 +328,8 @@ class BulkCommandResponder(CommandResponderBase):
M = int(maxRepetitions)
R = max(len(reqVarBinds)-N, 0)
- if R: M = min(M, self.maxVarBinds/R)
+ if R:
+ M = min(M, self.maxVarBinds/R)
debug.logger & debug.flagApp and debug.logger('handleMgmtOperation: N %d, M %d, R %d' % (N, M, R))
diff --git a/pysnmp/entity/rfc3413/ntfrcv.py b/pysnmp/entity/rfc3413/ntfrcv.py
index 44065c9b..0d3675aa 100644
--- a/pysnmp/entity/rfc3413/ntfrcv.py
+++ b/pysnmp/entity/rfc3413/ntfrcv.py
@@ -49,7 +49,8 @@ class NotificationReceiver:
else:
origPdu = None
- errorStatus = 'noError'; errorIndex = 0
+ errorStatus = 'noError'
+ errorIndex = 0
varBinds = v2c.apiPDU.getVarBinds(PDU)
debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, varBinds %s' % (stateReference, varBinds))
diff --git a/pysnmp/entity/rfc3413/oneliner/ntforg.py b/pysnmp/entity/rfc3413/oneliner/ntforg.py
index 675686b6..737dbf23 100644
--- a/pysnmp/entity/rfc3413/oneliner/ntforg.py
+++ b/pysnmp/entity/rfc3413/oneliner/ntforg.py
@@ -10,17 +10,27 @@ from pyasn1.compat.octets import null
from pysnmp.entity import config
from pysnmp.entity.rfc3413 import context
-__all__ = ['AsynNotificationOriginator', 'NotificationOriginator',
+__all__ = ['AsynNotificationOriginator',
+ 'NotificationOriginator',
'MibVariable']
MibVariable = ObjectIdentity
class ErrorIndicationReturn:
- def __init__(self, *vars): self.__vars = vars
- def __getitem__(self, i): return self.__vars[i]
- def __nonzero__(self): return self.__vars[0] and 1 or 0
- def __bool__(self): return bool(self.__vars[0])
- def __str__(self): return str(self.__vars[0])
+ def __init__(self, *vars):
+ self.__vars = vars
+
+ def __getitem__(self, i):
+ return self.__vars[i]
+
+ def __nonzero__(self):
+ return self.__vars[0] and 1 or 0
+
+ def __bool__(self):
+ return bool(self.__vars[0])
+
+ def __str__(self):
+ return str(self.__vars[0])
class AsynNotificationOriginator:
vbProcessor = NotificationOriginatorVarBinds()
@@ -41,7 +51,8 @@ class AsynNotificationOriginator:
self.mibViewController = self.vbProcessor.getMibViewController(self.snmpEngine)
- def __del__(self): self.uncfgNtfOrg()
+ def __del__(self):
+ self.uncfgNtfOrg()
def cfgNtfOrg(self, authData, transportTarget, notifyType):
return self.lcd.configure(