pass_typer: Avoid error when no password is selected
This commit is contained in:
parent
afd922caa1
commit
d64e59ec9b
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user