From 7af57c7fc471da57413b614907ab1ebb6251cebd Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Tue, 17 Oct 2017 18:53:58 +0200 Subject: [PATCH] [core/input] Handle epoll interrupts Sometimes epoll poll() calls get interrupted by the system - handle that more gracefully. --- bumblebee/input.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bumblebee/input.py b/bumblebee/input.py index cac471d..ebe11b2 100644 --- a/bumblebee/input.py +++ b/bumblebee/input.py @@ -28,7 +28,10 @@ def read_input(inp): if is_terminated(): return - events = epoll.poll(1) + try: + events = epoll.poll(1) + except Exception: + continue for fileno, event in events: line = "[" while "[" in line: