def _systemctl_wait_until_finish(self, machine, unit):
while True:<EOL><INDENT>metadata = convert_kv_to_dict(<EOL>run_cmd(<EOL>["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", machine, unit],<EOL>return_output=True))<EOL>if not metadata["<STR_LIT>"] in ["<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>time.sleep(<NUM_LIT:0.1>)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>run_cmd(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", machine, "<STR_LIT>", unit], ignore_status=True)<EOL>return metadata["<STR_LIT>"]<EOL>
Internal method
workaround for systemd-run without --wait option
see  _run_systemdrun_decide method

:param machine:
:param unit:
:return: