From 6b567b80c45c1f03c71e59cb4eb370fa331e038e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 27 Oct 2022 02:04:40 +0100 Subject: bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=129 --- src/backend/getEnvironment.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/getEnvironment.py') diff --git a/src/backend/getEnvironment.py b/src/backend/getEnvironment.py index 4214986..5edd038 100644 --- a/src/backend/getEnvironment.py +++ b/src/backend/getEnvironment.py @@ -1,16 +1,17 @@ #!/usr/bin/python3 +import io import subprocess def binhostURL(): binhostURL = [] portageExec = subprocess.Popen(['emerge', '--info', '--verbose'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = portageExec.communicate() - for portageOutput in stdout.decode('ascii').splitlines(): + for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): if "PORTAGE_BINHOST" in portageOutput: binhostURL = portageOutput.rstrip().split("=")[1].strip('\"') + portageExec.wait() return binhostURL def csvURL(): -- cgit v1.2.3