summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-05-27 09:01:56 +0200
committerIlya Etingof <etingof@gmail.com>2017-05-27 09:01:56 +0200
commitc196de621f8e88faa7b8b9fe1ec43cfdd9687576 (patch)
tree9f7bde8874571d9c3d1bf9bd6b703e55301a3298 /examples
parent72759c534ce3546c1a8f50321d29cf1d587ce7df (diff)
downloadpysnmp-git-c196de621f8e88faa7b8b9fe1ec43cfdd9687576.tar.gz
minor pep8 improvements
Diffstat (limited to 'examples')
-rw-r--r--examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py6
-rw-r--r--examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py6
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py4
3 files changed, 10 insertions, 6 deletions
diff --git a/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py b/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
index 027d3ac6..74cedeea 100644
--- a/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
+++ b/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
@@ -29,8 +29,10 @@ from pysnmp.hlapi.asyncio import *
@asyncio.coroutine
def sendone(snmpEngine, hostname, notifyType):
- errorIndication, errorStatus, \
- errorIndex, varBinds = yield from sendNotification(
+ (errorIndication,
+ errorStatus,
+ errorIndex,
+ varBinds) = yield from sendNotification(
snmpEngine,
CommunityData('public', tag=hostname),
UdpTransportTarget((hostname, 162), tagList=hostname),
diff --git a/examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py b/examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
index b45057e3..e453e6b5 100644
--- a/examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
+++ b/examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
@@ -25,8 +25,10 @@ from pysnmp.hlapi.asyncio import *
def run(varBinds):
snmpEngine = SnmpEngine()
while True:
- errorIndication, errorStatus, errorIndex, \
- varBindTable = yield from bulkCmd(
+ (errorIndication,
+ errorStatus,
+ errorIndex,
+ varBindTable) = yield from bulkCmd(
snmpEngine,
UsmUserData('usr-none-none'),
UdpTransportTarget(('demo.snmplabs.com', 161)),
diff --git a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
index 73cec838..ba65d60a 100644
--- a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
+++ b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
@@ -75,8 +75,8 @@ snmpEngineB = SnmpEngine()
snmpEngineB.registerTransportDispatcher(transportDispatcher, 'B')
for authData, transportTarget, contextData in targets:
- snmpEngine = transportTarget.getTransportInfo()[1][1] % 3 and \
- snmpEngineA or snmpEngineB
+ snmpEngine = (transportTarget.getTransportInfo()[1][1] % 3 and
+ snmpEngineA or snmpEngineB)
sendPduHandle = sendNotification(
snmpEngine,
authData,