/usr/lib/python3/dist-packages/pysnmp/entity/rfc3413/twisted/ntforg.py is in python3-pysnmp4 4.2.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | from twisted.internet import defer
from pysnmp.entity.rfc3413 import ntforg
from pyasn1.compat.octets import null
def _cbFun(sendRequestHandle, errorIndication,
errorStatus, errorIndex, varBinds, cbCtx):
cbCtx.callback((errorIndication, errorStatus, errorIndex, varBinds))
class NotificationOriginator(ntforg.NotificationOriginator):
def sendNotification(
self,
snmpEngine,
notificationTarget,
notificationName,
additionalVarBinds=None,
contextName=null
):
df = defer.Deferred()
ntforg.NotificationOriginator.sendNotification(
self,
snmpEngine,
notificationTarget,
notificationName,
additionalVarBinds,
_cbFun,
df,
contextName=null
)
return df
|