summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pysnmp/carrier/asyncore/base.py11
-rw-r--r--pysnmp/carrier/base.py11
-rw-r--r--pysnmp/hlapi/transport.py3
3 files changed, 13 insertions, 12 deletions
diff --git a/pysnmp/carrier/asyncore/base.py b/pysnmp/carrier/asyncore/base.py
index 45e2fb23..bee6ca6b 100644
--- a/pysnmp/carrier/asyncore/base.py
+++ b/pysnmp/carrier/asyncore/base.py
@@ -66,17 +66,6 @@ class AbstractSocketTransport(asyncore.dispatcher, AbstractTransport):
def unregisterSocket(self, sockMap=None):
self.del_channel(sockMap)
- # Public API
-
- def openClientMode(self, iface=None):
- raise error.CarrierError('Method not implemented')
-
- def openServerMode(self, iface=None):
- raise error.CarrierError('Method not implemented')
-
- def sendMessage(self, outgoingMessage, transportAddress):
- raise error.CarrierError('Method not implemented')
-
def closeTransport(self):
AbstractTransport.closeTransport(self)
self.close()
diff --git a/pysnmp/carrier/base.py b/pysnmp/carrier/base.py
index 51c76eb0..5d6772a6 100644
--- a/pysnmp/carrier/base.py
+++ b/pysnmp/carrier/base.py
@@ -211,3 +211,14 @@ class AbstractTransport:
def closeTransport(self):
self.unregisterCbFun()
+
+ # Public API
+
+ def openClientMode(self, iface=None):
+ raise error.CarrierError('Method not implemented')
+
+ def openServerMode(self, iface=None):
+ raise error.CarrierError('Method not implemented')
+
+ def sendMessage(self, outgoingMessage, transportAddress):
+ raise error.CarrierError('Method not implemented')
diff --git a/pysnmp/hlapi/transport.py b/pysnmp/hlapi/transport.py
index c836a033..2dbd5cea 100644
--- a/pysnmp/hlapi/transport.py
+++ b/pysnmp/hlapi/transport.py
@@ -1,11 +1,12 @@
from pyasn1.compat.octets import null
+from pysnmp.carrier.base import AbstractTransport
from pysnmp import error
__all__ = []
class AbstractTransportTarget:
transportDomain = None
- protoTransport = NotImplementedError
+ protoTransport = AbstractTransport
def __init__(self, transportAddr, timeout=1, retries=5, tagList=null):
self.transportAddr = self._resolveAddr(transportAddr)
self.timeout = timeout