diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-04-27 09:38:38 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-04-27 09:38:38 +0200 |
commit | ad3d3b2d19c412e648ab77dfc4c80b3a0f160656 (patch) | |
tree | eef173b11eeba4660467c474e74c0abedba86d58 /src/utils/probe.py | |
parent | 097769b971f64f93004a87393721a289fe3db13f (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/utils/probe.py')
-rw-r--r-- | src/utils/probe.py | 4 |
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}' |