]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
props: Use subprocess for host getprop
authorErfan Abdi <erfangplus@gmail.com>
Thu, 21 Oct 2021 20:09:36 +0000 (23:39 +0330)
committerErfan Abdi <erfangplus@gmail.com>
Thu, 21 Oct 2021 20:09:36 +0000 (23:39 +0330)
tools/helpers/props.py

index bcc7c3465eb0e22dcf6d624b64c8f9ed64e7be4d..46ab268f0c455d78e875716859131344fb195cd9 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright 2021 Oliver Smith
 # SPDX-License-Identifier: GPL-3.0-or-later
 from shutil import which
+import subprocess
 import logging
 import os
 import tools.helpers.run
@@ -10,7 +11,7 @@ from tools.interfaces import IPlatform
 def host_get(args, prop):
     if which("getprop") is not None:
         command = ["getprop", prop]
-        return tools.helpers.run.user(args, command, output_return=True).strip()
+        return subprocess.run(command, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()
     else:
         return ""