summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2016-06-12 14:07:24 +0200
committerIlya Etingof <etingof@gmail.com>2016-06-12 14:07:24 +0200
commit91a1292067bfda55320f188eb1c8cce4af7a3266 (patch)
treec73fd39bf0eaf76207efdc6ed4ed191e50f31bf9 /examples
parent912517cb2d79fddc512a1304c18a9b20cb20cf80 (diff)
downloadpysnmp-git-91a1292067bfda55320f188eb1c8cce4af7a3266.tar.gz
converted to new-style classes
Diffstat (limited to 'examples')
-rw-r--r--examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py2
-rw-r--r--examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py b/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py
index d289982e..f5fe5fdf 100644
--- a/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py
+++ b/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py
@@ -79,7 +79,7 @@ class Worker(Thread):
self.requests.task_done()
-class ThreadPool:
+class ThreadPool(object):
def __init__(self, num_threads):
self.requests = Queue(num_threads)
self.responses = []
diff --git a/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py b/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py
index 25a396c6..328e5d28 100644
--- a/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py
+++ b/examples/v1arch/asyncore/agent/cmdrsp/implementing-scalar-mib-objects.py
@@ -26,7 +26,7 @@ from pysnmp.proto import api
import time, bisect
-class SysDescr:
+class SysDescr(object):
name = (1, 3, 6, 1, 2, 1, 1, 1, 0)
def __eq__(self, other): return self.name == other
@@ -47,7 +47,7 @@ class SysDescr:
)
-class Uptime:
+class Uptime(object):
name = (1, 3, 6, 1, 2, 1, 1, 3, 0)
birthday = time.time()