diff options
Diffstat (limited to 'pysnmp/carrier/twisted/dgram/unix.py')
-rw-r--r-- | pysnmp/carrier/twisted/dgram/unix.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pysnmp/carrier/twisted/dgram/unix.py b/pysnmp/carrier/twisted/dgram/unix.py index a256969c..fe9c459b 100644 --- a/pysnmp/carrier/twisted/dgram/unix.py +++ b/pysnmp/carrier/twisted/dgram/unix.py @@ -24,15 +24,15 @@ class UnixTwistedTransport(DgramTwistedTransport): def openClientMode(self, iface=''): try: self._lport = reactor.connectUNIXDatagram(iface, self) - 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.listenUNIXDatagram(iface, self) - except Exception: - raise error.CarrierError(sys.exc_info()[1]) + except Exception as exc: + raise error.CarrierError(exc) return self |