summaryrefslogtreecommitdiff
path: root/src/backend/getEnvironment.py
diff options
context:
space:
mode:
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():