summaryrefslogtreecommitdiff
path: root/pysnmp/carrier
diff options
context:
space:
mode:
authorelie <elie>2014-06-14 19:50:13 +0000
committerelie <elie>2014-06-14 19:50:13 +0000
commitf55eeb2072452c7a50a8a301235bc032e71e1238 (patch)
treea815fbf00a8142c0851341ac94f18836ae77264c /pysnmp/carrier
parent5c65579de3520153fb48e134a3ec84c30eb0caec (diff)
downloadpysnmp-f55eeb2072452c7a50a8a301235bc032e71e1238.tar.gz
fix to asyncore-based transport not to use asyncore's cheap inheritance
from socket object what caused warnings.
Diffstat (limited to 'pysnmp/carrier')
-rw-r--r--pysnmp/carrier/asynsock/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pysnmp/carrier/asynsock/base.py b/pysnmp/carrier/asynsock/base.py
index 6e9d0db..7685367 100644
--- a/pysnmp/carrier/asynsock/base.py
+++ b/pysnmp/carrier/asynsock/base.py
@@ -45,6 +45,8 @@ class AbstractSocketTransport(asyncore.dispatcher, AbstractTransport):
sock.setblocking(0)
self.set_socket(sock)
+ def __hash__(self): return hash(self.socket)
+
# The following two methods are part of base class so here we overwrite
# them to separate socket management from dispatcher registration tasks.
# These two are just for dispatcher registration.