Exit successfully when the user makes no selection

This commit is contained in:
cryzed 2017-11-03 13:54:43 +01:00
parent 4ec2e5485a
commit 600d2a543d

View File

@ -131,6 +131,10 @@ def main(arguments):
selection = candidates.pop() if len(candidates) == 1 else dmenu(sorted(candidates), arguments.dmenu_invocation,
arguments.io_encoding)
# Nothing was selected, simply return
if not selection:
return ExitCodes.SUCCESS
secret = pass_(selection, arguments.io_encoding)
# Match username