tools: make sure we check for ratbagd_process returncode
It was accidentally put as a dead code 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 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:
