Skip to content

Commit

Permalink
Fix plugin on OpenATV with python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Taapat committed Feb 19, 2022
1 parent 2379087 commit 95bd2d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def camliststart(self):
self.camliststart()

def camactive(self, result, retval, extra_args):
if result.decode("utf-8").strip():
if result.strip():
self.createcamlist()
else:
self.actcam = "none"
Expand All @@ -159,7 +159,7 @@ def camactive(self, result, retval, extra_args):
self.checkConsole.ePopen("echo 1", self.camactivefromlist, "none")

def camactivefromlist(self, result, retval, extra_args):
if result.decode("utf-8").strip():
if result.strip():
self.actcam = extra_args
self.createcamlist()
else:
Expand Down
4 changes: 3 additions & 1 deletion src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def camnotrun(self):
self.Console.ePopen("ps", self.checkprocess)

def checkprocess(self, result, retval, extra_args):
processes = result.decode("utf-8").lower()
if hasattr(result, 'decode'):
result = result.decode("utf-8")
processes = result.lower()
camlist = ["oscam", "mgcamd", "wicard", "camd3", "mcas", "cccam",
"gbox", "mpcs", "mbox", "newcs", "vizcam", "rucam"]
camlist.insert(0, config.plugins.AltSoftcam.actcam.value)
Expand Down

0 comments on commit 95bd2d9

Please sign in to comment.