It appears that .get takes a list.
On zesty:
root@zesty:~# python
Python 2.7.12+ (default, Nov 22 2016, 00:48:54)
[GCC 6.2.1 20161119] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import netsnmp
>>> session = netsnmp.Session( DestHost='demo.snmplabs.com', Version=2,
>>> Community='public' )
>>> vars = netsnmp.Varbind('1.3.6.1.2.1.43.10.2.1.4.1.1')
>>> session.get(vars)
Segmentation fault (core dumped)
That said if I do it this way I avoid the core dump:
>>> vars = netsnmp.VarList( netsnmp.Varbind('1.3.6.1.2.1.43.10.2.1.4.1.1') )
>>> session.get(vars)
>>> error: get: unknown object ID (1.3.6.1.2.1.43.10.2.1.4.1.1)
Which is a lot better :)
** Changed in: net-snmp (Ubuntu)
Status: New => Confirmed
** Changed in: net-snmp (Ubuntu)
Importance: Undecided => Low
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1541152
Title:
segmentation fault when calling session.get() method
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1541152/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs