From ceddbf89ac27fc6dcfe68908d5e44827f73a94ac Mon Sep 17 00:00:00 2001 From: Erfan Abdi Date: Thu, 21 Oct 2021 23:39:36 +0330 Subject: [PATCH] props: Use subprocess for host getprop --- tools/helpers/props.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/helpers/props.py b/tools/helpers/props.py index bcc7c34..46ab268 100644 --- a/tools/helpers/props.py +++ b/tools/helpers/props.py @@ -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 "" -- 2.47.3