summaryrefslogtreecommitdiff
path: root/pysnmp/proto/api
diff options
context:
space:
mode:
authorelie <elie>2015-10-17 20:22:30 +0000
committerelie <elie>2015-10-17 20:22:30 +0000
commita46f37c26520015e3ad8628587db3899f55d8c33 (patch)
tree6798d1e7f1a5bac03b595d4e6b27b8735bb9c1eb /pysnmp/proto/api
parent9e73d5b89c6121437b92f02482b4423ab526b51a (diff)
downloadpysnmp-git-a46f37c26520015e3ad8628587db3899f55d8c33.tar.gz
linted for bad-whitespace and some other issues
Diffstat (limited to 'pysnmp/proto/api')
-rw-r--r--pysnmp/proto/api/__init__.py2
-rw-r--r--pysnmp/proto/api/v1.py4
-rw-r--r--pysnmp/proto/api/v2c.py16
3 files changed, 11 insertions, 11 deletions
diff --git a/pysnmp/proto/api/__init__.py b/pysnmp/proto/api/__init__.py
index f6e4bae9..47782bf2 100644
--- a/pysnmp/proto/api/__init__.py
+++ b/pysnmp/proto/api/__init__.py
@@ -3,6 +3,6 @@ from pysnmp.proto.api import v1, v2c, verdec
# Protocol versions
protoVersion1 = 0
protoVersion2c = 1
-protoModules = { protoVersion1: v1, protoVersion2c: v2c }
+protoModules = {protoVersion1: v1, protoVersion2c: v2c}
decodeMessageVersion = verdec.decodeMessageVersion
diff --git a/pysnmp/proto/api/v1.py b/pysnmp/proto/api/v1.py
index a7618784..2dbb7c94 100644
--- a/pysnmp/proto/api/v1.py
+++ b/pysnmp/proto/api/v1.py
@@ -133,7 +133,7 @@ apiPDU = PDUAPI()
class TrapPDUAPI:
_networkAddress = None
- _entOid = ObjectIdentifier((1,3,6,1,4,1,20408))
+ _entOid = ObjectIdentifier((1, 3, 6, 1, 4, 1, 20408))
_genericTrap = rfc1157._genericTrap.clone('coldStart')
_zeroInt = univ.Integer(0)
_zeroTime = TimeTicks(0)
@@ -147,7 +147,7 @@ class TrapPDUAPI:
self._networkAddress = NetworkAddress().setComponentByPosition(0, agentAddress)
pdu.setComponentByPosition(0, self._entOid, verifyConstraints=False)
pdu.setComponentByPosition(1, self._networkAddress, verifyConstraints=False)
- pdu.setComponentByPosition(2, self._genericTrap,verifyConstraints=False)
+ pdu.setComponentByPosition(2, self._genericTrap, verifyConstraints=False)
pdu.setComponentByPosition(3, self._zeroInt, verifyConstraints=False)
pdu.setComponentByPosition(4, self._zeroTime, verifyConstraints=False)
pdu.setComponentByPosition(5)
diff --git a/pysnmp/proto/api/v2c.py b/pysnmp/proto/api/v2c.py
index 5dbb1beb..807d1b06 100644
--- a/pysnmp/proto/api/v2c.py
+++ b/pysnmp/proto/api/v2c.py
@@ -92,8 +92,8 @@ class BulkPDUAPI(PDUAPI):
def getMaxRepetitions(self, pdu):
return pdu.getComponentByPosition(2)
- def setMaxRepetitions(self,pdu,value):
- pdu.setComponentByPosition(2,value)
+ def setMaxRepetitions(self, pdu, value):
+ pdu.setComponentByPosition(2, value)
def getVarBindTable(self, reqPDU, rspPDU):
nonRepeaters = self.getNonRepeaters(reqPDU)
@@ -123,13 +123,13 @@ class BulkPDUAPI(PDUAPI):
apiBulkPDU = BulkPDUAPI()
class TrapPDUAPI(v1.PDUAPI):
- sysUpTime = (1,3,6,1,2,1,1,3,0)
- snmpTrapAddress = (1,3,6,1,6,3,18,1,3,0)
- snmpTrapCommunity = (1,3,6,1,6,3,18,1,4,0)
- snmpTrapOID = (1,3,6,1,6,3,1,1,4,1,0)
- snmpTrapEnterprise = (1,3,6,1,6,3,1,1,4,3,0)
+ sysUpTime = (1, 3, 6, 1, 2, 1, 1, 3, 0)
+ snmpTrapAddress = (1, 3, 6, 1, 6, 3, 18, 1, 3, 0)
+ snmpTrapCommunity = (1, 3, 6, 1, 6, 3, 18, 1, 4, 0)
+ snmpTrapOID = (1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0)
+ snmpTrapEnterprise = (1, 3, 6, 1, 6, 3, 1, 1, 4, 3, 0)
_zeroTime = TimeTicks(0)
- _genTrap = ObjectIdentifier((1,3,6,1,6,3,1,1,5,1))
+ _genTrap = ObjectIdentifier((1, 3, 6, 1, 6, 3, 1, 1, 5, 1))
def setDefaults(self, pdu):
v1.PDUAPI.setDefaults(self, pdu)
varBinds = [(self.sysUpTime, self._zeroTime),