summaryrefslogtreecommitdiff
path: root/pysnmp/carrier/twisted/dgram/udp.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-02-09 17:47:15 +0100
committerIlya Etingof <etingof@gmail.com>2019-02-09 17:47:15 +0100
commit2b5603ecf98c1c47e94a405bd98054d1703af9e7 (patch)
treed0f544c895b238fbb5660dbf23b3d54c31bfa0b9 /pysnmp/carrier/twisted/dgram/udp.py
parent05b982f4b1cfa143d6fa607a6b9b24d3a77981a1 (diff)
downloadpysnmp-git-2b5603ecf98c1c47e94a405bd98054d1703af9e7.tar.gz
Drop Python < 2.6 except statement compatibility trick
Diffstat (limited to 'pysnmp/carrier/twisted/dgram/udp.py')
-rw-r--r--pysnmp/carrier/twisted/dgram/udp.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pysnmp/carrier/twisted/dgram/udp.py b/pysnmp/carrier/twisted/dgram/udp.py
index ac0f23f1..bdb93cdd 100644
--- a/pysnmp/carrier/twisted/dgram/udp.py
+++ b/pysnmp/carrier/twisted/dgram/udp.py
@@ -28,15 +28,15 @@ class UdpTwistedTransport(DgramTwistedTransport):
iface = ('', 0)
try:
self._lport = reactor.listenUDP(iface[1], self, iface[0])
- except Exception:
- raise error.CarrierError(sys.exc_info()[1])
+ except Exception as exc:
+ raise error.CarrierError(exc)
return self
def openServerMode(self, iface):
try:
self._lport = reactor.listenUDP(iface[1], self, iface[0])
- except Exception:
- raise error.CarrierError(sys.exc_info()[1])
+ except Exception as exc:
+ raise error.CarrierError(exc)
return self
def closeTransport(self):