[modules/cmus] Fix Python3 compatibility issue
This commit is contained in:
parent
d2bef950ba
commit
f7f6783659
1 changed files with 4 additions and 2 deletions
|
@ -69,8 +69,10 @@ class Module(bumblebee.engine.Module):
|
|||
return returns.get(widget.name, self._status)
|
||||
|
||||
def _eval_line(self, line):
|
||||
line = line.encode("utf-8", "replace")
|
||||
items = line.split(" ", 2)
|
||||
# not a typo, use decode detection to see whether we are
|
||||
# dealing with Python2 or Python3
|
||||
if hasattr(line, "decode"):
|
||||
line = line.encode("utf-8", "replace")
|
||||
name, key, value = (line.split(" ", 2) + [None, None])[:3]
|
||||
|
||||
if name == "status":
|
||||
|
|
Loading…
Reference in a new issue