summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2022-04-27 09:38:38 +0200
committerJose M. Guisado <jguisado@soleta.eu>2022-04-27 09:38:38 +0200
commitad3d3b2d19c412e648ab77dfc4c80b3a0f160656 (patch)
treeeef173b11eeba4660467c474e74c0abedba86d58 /src
parent097769b971f64f93004a87393721a289fe3db13f (diff)
utils: decode probing subprocess stdout
Cannot replace str ('\n') when stdout is a bytes object. Also fixes some typos (i.e: proc_releaseid stdout was used twice).
Diffstat (limited to 'src')
-rw-r--r--src/utils/probe.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/probe.py b/src/utils/probe.py
index 4600ff4..d14146c 100644
--- a/src/utils/probe.py
+++ b/src/utils/probe.py
@@ -52,8 +52,8 @@ def getwindowsversion(winreghives):
'microsoft\windows nt\currentversion',
'ReleaseId'], stdout=PIPE)
- proc_prodname = proc_releaseid.stdout.replace('\n', '')
- releaseid = proc_releaseid.stdout.replace('\n', '')
+ prodname = proc_prodname.stdout.decode().replace('\n', '')
+ releaseid = proc_releaseid.stdout.decode().replace('\n', '')
if proc_prodname.returncode == 0 and proc_releaseid.returncode == 0:
return f'{prodname} {releaseid}'