Skip to content

Commit 84a5cf5

Browse files
committed
Merge branch 'develop'
2 parents 0555c11 + 7225e1b commit 84a5cf5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

networkmanager_dmenu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,9 +690,9 @@ def get_passphrase():
690690
encoding=ENC,
691691
input=f"setdesc {description}\nsetprompt {prompt}\ngetpin\n").stdout
692692
if out:
693-
res = out.split("\n")[2]
694-
if res.startswith("D "):
695-
pin = res.split("D ")[1]
693+
res = [i for i in out.split("\n") if i.startswith("D ")]
694+
if res and res[0].startswith("D "):
695+
pin = res[0].split("D ")[1]
696696
return pin
697697
return subprocess.run(dmenu_cmd(0, "Passphrase"),
698698
stdin=subprocess.DEVNULL,

0 commit comments

Comments
 (0)