Fixed crash if used with normal pipe
If one wants to run i3status as a subprocess of i3pystatus, do it like this: import subprocess import io ... process = subprocess.Popen(["i3status", "-c", "~/.i3/status"], stdout=subprocess.PIPE) stdin = io.TextIOWrapper(process.stdout) status = I3statusHandler(stdin)
This commit is contained in:
parent
426f57d97d
commit
99b1e003cb
@ -60,7 +60,7 @@ class IOHandler:
|
||||
Raises EOFError if the end of stream has been reached"""
|
||||
|
||||
try:
|
||||
line = self.inp.readline().decode("utf-8").strip()
|
||||
line = self.inp.readline().strip()
|
||||
except KeyboardInterrupt:
|
||||
raise EOFError()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user