summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-07-19 16:56:58 +0200
committerBenjamin Berg <bberg@redhat.com>2021-07-22 14:22:21 +0200
commite4e6f36196da4b9ac819599e83496320033515ea (patch)
tree923abf554f68b18e2648603f8ba745e58ff35e24 /tests
parentf7da08c48a296ac136fa44377da5294f068797c6 (diff)
downloadgnome-settings-daemon-e4e6f36196da4b9ac819599e83496320033515ea.tar.gz
tests: Use poll rather than select
Just because poll is the more modern API.
Diffstat (limited to 'tests')
-rw-r--r--tests/output_checker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 7cb1060a..765da9ce 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -47,12 +47,14 @@ class OutputChecker(object):
self._thread.start()
def _copy(self):
+ p = select.poll()
+ p.register(self._pipe_fd_r)
while True:
try:
# Be lazy and wake up occasionally in case _pipe_fd_r became invalid
# The reason to do this is because os.read() will *not* return if the
# FD is forcefully closed.
- select.select([self._pipe_fd_r], [], [], 0.1)
+ p.poll(0.1)
r = os.read(self._pipe_fd_r, 1024)
if not r: