From 5efd83fc41daeb5f2a18ada3ff07268c34de0b6e Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 14 Sep 2017 10:32:54 +0200 Subject: [PATCH] tools: make sure we check for ratbagd_process returncode It was accidentally put as a dead code in 6cfca9e34b5. Signed-off-by: Benjamin Tissoires --- tools/ratbagctl.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/ratbagctl.in b/tools/ratbagctl.in index 66a5b2c6..8196ba8b 100755 --- a/tools/ratbagctl.in +++ b/tools/ratbagctl.in @@ -1444,10 +1444,9 @@ def open_ratbagd(ratbagd_process=None): except RatbagdDBusUnavailable: print("Unable to connect to ratbagd over dbus") return None - else: - if not r.devices: - print("No devices available.") - return r + + if not r.devices: + print("No devices available.") if ratbagd_process is not None: # if some old version of ratbagd is still running, ratbagd_process may @@ -1457,6 +1456,8 @@ def open_ratbagd(ratbagd_process=None): ratbagd_process.poll() assert ratbagd_process.returncode is None + return r + def main(argv): if not argv: