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:
enkore 2013-02-21 14:05:11 +01:00
parent 426f57d97d
commit 99b1e003cb

View File

@ -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()