From 71ed5d6eb5523cbb5bf2684bb6cab6670f535076 Mon Sep 17 00:00:00 2001 From: Mitja Schmakeit Date: Mon, 26 Feb 2018 12:14:42 +0100 Subject: [PATCH] Python 3.2 Condition.wait() with timeout returns True/False. Added return to IOCB.wait() --- py34/bacpypes/iocb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py34/bacpypes/iocb.py b/py34/bacpypes/iocb.py index db96cba..730d383 100644 --- a/py34/bacpypes/iocb.py +++ b/py34/bacpypes/iocb.py @@ -141,12 +141,12 @@ class IOCB(DebugContents): if self.ioComplete.isSet(): self.trigger() - def wait(self, *args): + def wait(self, *args, **kwargs): """Wait for the completion event to be set.""" - if _debug: IOCB._debug("wait(%d) %r", self.ioID, args) + if _debug: IOCB._debug("wait(%d) %r %r", self.ioID, args, kwargs) # waiting from a non-daemon thread could be trouble - self.ioComplete.wait(*args) + return self.ioComplete.wait(*args, **kwargs) def trigger(self): """Set the completion event and make the callback(s)."""