From: Rinigus Date: Wed, 27 Oct 2021 20:03:41 +0000 (+0300) Subject: container: strip possible trailing newline from pid X-Git-Tag: 1.2.1~11 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/d03e10c132de8e03dff781868b3e37b7f7c7128a container: strip possible trailing newline from pid Fixes #185 --- diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index 898bb83..ee91c52 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -206,7 +206,7 @@ def stop(args): # Sensors if which("waydroid-sensord"): command = ["pidof", "waydroid-sensord"] - pid = tools.helpers.run.user(args, command, check=False, output_return=True) + pid = tools.helpers.run.user(args, command, check=False, output_return=True).strip() if pid: command = ["kill", "-9", pid] tools.helpers.run.user(args, command, check=False)