summaryrefslogtreecommitdiff
path: root/pysnmp/carrier/asyncore/dispatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/carrier/asyncore/dispatch.py')
-rw-r--r--pysnmp/carrier/asyncore/dispatch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pysnmp/carrier/asyncore/dispatch.py b/pysnmp/carrier/asyncore/dispatch.py
index 221c596c..3517bdff 100644
--- a/pysnmp/carrier/asyncore/dispatch.py
+++ b/pysnmp/carrier/asyncore/dispatch.py
@@ -35,8 +35,7 @@ class AsyncoreDispatcher(AbstractTransportDispatcher):
def transportsAreWorking(self):
for transport in self.__sockMap.values():
if transport.writable():
- return 1
- return 0
+ return True
def runDispatcher(self, timeout=0.0):
while self.jobsArePending() or self.transportsAreWorking():
@@ -45,6 +44,7 @@ class AsyncoreDispatcher(AbstractTransportDispatcher):
use_poll=True, map=self.__sockMap, count=1)
except KeyboardInterrupt:
raise
- except:
+
+ except Exception:
raise PySnmpError('poll error: %s' % ';'.join(format_exception(*exc_info())))
self.handleTimerTick(time())