diff --git a/test.py b/test.py index 9ee63ea..0794191 100644 --- a/test.py +++ b/test.py @@ -56,6 +56,7 @@ def test_pipes_stderr(): with pipes(stdout=stdout, stderr=STDOUT) as (_stdout, _stderr): printf(u"Hellø") libc.fflush(c_stdout_p) + time.sleep(0.1) printf_err(u"Hi, stdérr") assert _stdout is stdout assert _stderr is None diff --git a/wurlitzer.py b/wurlitzer.py index 93217b7..cf853bb 100644 --- a/wurlitzer.py +++ b/wurlitzer.py @@ -181,7 +181,7 @@ def forwarder(): poller.register(pipe_, select.POLLIN | select.POLLPRI) while pipes: - events = poller.poll(flush_interval) + events = poller.poll(int(flush_interval * 1000)) #r = all([(r_[1] == (select.POLLIN | select.POLLPRI)) for r_ in events]) if events: # found something to read, don't block select until