summaryrefslogtreecommitdiff
path: root/src/backend/getEnvironment.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-27 02:04:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-27 02:04:40 +0100
commit6b567b80c45c1f03c71e59cb4eb370fa331e038e (patch)
tree4a7a3e45fd8c49e9a3b1634c51363b3c87243b54 /src/backend/getEnvironment.py
parentc9fada27e2381b7a3d53d93014a1a9921c0f56c4 (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=129
Diffstat (limited to 'src/backend/getEnvironment.py')
-rw-r--r--src/backend/getEnvironment.py5
1 files changed, 3 insertions, 2 deletions
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():