Commit 0ca708ac authored by Vincent Pelletier's avatar Vincent Pelletier

Add BaseConnection.isPending() .

Also, make HandlerSwitcher.isPending() return a boolean, to avoid leaking
instance content to foreign code.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2259 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6cca2327
......@@ -94,7 +94,7 @@ class HandlerSwitcher(object):
self._pending = [[{}, handler]]
def isPending(self):
return self._pending[0][0]
return bool(self._pending[0][0])
def getHandler(self):
return self._pending[0][1]
......@@ -268,6 +268,9 @@ class BaseConnection(object):
self._timeout = Timeout()
event_manager.register(self)
def isPending(self):
return self._handlers.isPending()
def checkTimeout(self, t):
handlers = self._handlers
if handlers.isPending():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment