[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
This commit is contained in:
parent
7a12a07a7c
commit
3e39f443ef
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ def read_input(inp):
|
||||||
continue
|
continue
|
||||||
for fileno, event in events:
|
for fileno, event in events:
|
||||||
line = "["
|
line = "["
|
||||||
while "[" in line:
|
while line.startswith("["):
|
||||||
line = sys.stdin.readline().strip(",").strip()
|
line = sys.stdin.readline().strip(",").strip()
|
||||||
inp.has_event = True
|
inp.has_event = True
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue