diff options
author | Ilya Etingof <etingof@gmail.com> | 2016-04-01 22:58:56 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2016-04-01 22:58:56 +0200 |
commit | 020791a97232849c9504024834906dd4a4ffb36c (patch) | |
tree | 6e5d69aa01877ee004efb77645b8148e586610cc /examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py | |
parent | 9541f201e33cd613995cee2e7a7656aa687deb51 (diff) | |
download | pysnmp-git-020791a97232849c9504024834906dd4a4ffb36c.tar.gz |
pep8 reformatted
Diffstat (limited to 'examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py')
-rw-r--r-- | examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py b/examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py index 429b117d..1b434702 100644 --- a/examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py +++ b/examples/v3arch/asyncio/manager/ntfrcv/multiple-interfaces.py @@ -19,7 +19,7 @@ receiver: Requires Python 3.4 and later! -"""# +""" # from pysnmp.entity import engine, config from pysnmp.carrier.asyncio.dgram import udp from pysnmp.entity.rfc3413 import ntfrcv @@ -53,6 +53,7 @@ config.addTransport( # SecurityName <-> CommunityName mapping config.addV1System(snmpEngine, 'my-area', 'public') + # Callback function for receiving notifications # noinspection PyUnusedLocal def cbFun(snmpEngine, @@ -61,14 +62,13 @@ def cbFun(snmpEngine, varBinds, cbCtx): transportDomain, transportAddress = snmpEngine.msgAndPduDsp.getTransportInfo(stateReference) - print('Notification from %s, SNMP Engine %s, Context %s' % ( - transportAddress, contextEngineId.prettyPrint(), - contextName.prettyPrint() - ) - ) + print('Notification from %s, SNMP Engine %s, Context %s' % (transportAddress, + contextEngineId.prettyPrint(), + contextName.prettyPrint())) for name, val in varBinds: print('%s = %s' % (name.prettyPrint(), val.prettyPrint())) - + + # Register SNMP Application at the SNMP engine ntfrcv.NotificationReceiver(snmpEngine, cbFun) |