summaryrefslogtreecommitdiff
path: root/examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py
diff options
context:
space:
mode:
authorelie <elie>2015-09-27 10:26:25 +0000
committerelie <elie>2015-09-27 10:26:25 +0000
commit627d9ff4a3715477e56fe397f099ad0db0d5c1b9 (patch)
tree60cdd6f446e892194122abad0dfa4c6413eb4374 /examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py
parentbdfbce73382678e0288d8bc8d3093c827b05e1d1 (diff)
downloadpysnmp-627d9ff4a3715477e56fe397f099ad0db0d5c1b9.tar.gz
* Asyncore and asyncio-based APIs reworked to become functions.
* Asyncio and Twisted API moved entirely into high-level domain to be aligned with other high-level APIs. This WILL BREAK backward compatibility for those apps that use Twisted API.
Diffstat (limited to 'examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py')
-rw-r--r--examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py b/examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py
index a6965fe..cfa274f 100644
--- a/examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py
+++ b/examples/hlapi/asyncore/manager/cmdgen/custom-timeout-and-retries.py
@@ -25,16 +25,16 @@ means one initial request plus one retry.
Functionally similar to:
-| $ snmpget -v1 -c public demo.snmplabs.com 1.3.6.1.2.1.1.1.0
+| $ snmpget -v1 -c public -t 2 -r 0 demo.snmplabs.com 1.3.6.1.2.1.1.1.0
"""#
-from pysnmp.hlapi.asyncore import *
+from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
getCmd(SnmpEngine(),
CommunityData('public'),
UdpTransportTarget(
- ('demo.snmplabs.com', 161), timeout=1.5, retries=0
+ ('demo.snmplabs.com', 161), timeout=2.0, retries=0
),
ContextData(),
ObjectType(ObjectIdentity('1.3.6.1.2.1.1.1.0')))