pass_typer: Avoid error when no password is selected

This commit is contained in:
Adam Goldsmith 2022-04-12 11:41:51 -04:00
parent afd922caa1
commit d64e59ec9b

View File

@ -53,9 +53,10 @@ def select_and_type(server_name: Path) -> None:
) )
selected = rofi_select(file_list) selected = rofi_select(file_list)
password = get_password(selected) if selected:
password = get_password(selected)
subprocess.run(["xdotool", "type", password + "\n"]) subprocess.run(["xdotool", "type", password + "\n"])
window_name = cmd(["xdotool", "getactivewindow", "getwindowname"]).stdout.strip() window_name = cmd(["xdotool", "getactivewindow", "getwindowname"]).stdout.strip()