From 3e39f443efdaa02c2e14725e79e8343f73e1247e Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Tue, 6 Nov 2018 17:51:48 +0100 Subject: [PATCH] [core/input] More robust event reading Regular i3bar events *can* contain the character [, so a better mechanism for detecting the initial opening [ is required. For now, do a minimal change that requires the line to *start* with [. This should never be the case for i3bar events, which are always JSON objects. fixes #318 --- bumblebee/input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/input.py b/bumblebee/input.py index cb8c28a..40fba85 100644 --- a/bumblebee/input.py +++ b/bumblebee/input.py @@ -34,7 +34,7 @@ def read_input(inp): continue for fileno, event in events: line = "[" - while "[" in line: + while line.startswith("["): line = sys.stdin.readline().strip(",").strip() inp.has_event = True try: