summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2016-04-01 22:58:56 +0200
committerIlya Etingof <etingof@gmail.com>2016-04-01 22:58:56 +0200
commit020791a97232849c9504024834906dd4a4ffb36c (patch)
tree6e5d69aa01877ee004efb77645b8148e586610cc /examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
parent9541f201e33cd613995cee2e7a7656aa687deb51 (diff)
downloadpysnmp-git-020791a97232849c9504024834906dd4a4ffb36c.tar.gz
pep8 reformatted
Diffstat (limited to 'examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py')
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py b/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
index 36e461fb..cbaa1d0b 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
@@ -52,6 +52,7 @@ config.addTargetAddr(
'my-creds'
)
+
# Error/response receiver
# noinspection PyUnusedLocal,PyUnusedLocal,PyUnusedLocal
def cbFun(snmpEngine, sendRequestHandle, errorIndication,
@@ -60,26 +61,24 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
print(errorIndication)
return
if errorStatus:
- print('%s at %s' % (
- errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1][0] or '?'
- )
- )
+ print('%s at %s' % (errorStatus.prettyPrint(),
+ errorIndex and varBindTable[-1][int(errorIndex) - 1][0] or '?'))
return # stop on error
for varBindRow in varBindTable:
for oid, val in varBindRow:
if initialOID.isPrefixOf(oid):
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
else:
- return False # signal dispatcher to stop
- return True # signal dispatcher to continue
+ return False # signal dispatcher to stop
+ return True # signal dispatcher to continue
+
# Prepare initial request to be sent
cmdgen.NextCommandGenerator().sendVarBinds(
snmpEngine,
'my-router',
None, '', # contextEngineId, contextName
- [ (initialOID, None) ],
+ [(initialOID, None)],
cbFun
)