Fix login when only one entry is available

This commit is contained in:
Jay Kamat 2018-03-22 21:35:00 -04:00
parent 948866f4f2
commit a1776087e0
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -219,11 +219,12 @@ def run(args):
args.dmenu_invocation,
args.io_encoding)
if selection not in candidates_map:
stderr("'{}' was not a valid entry!").format(selection)
return ExitCodes.USER_QUIT
if selection not in candidates_map:
stderr("'{}' was not a valid entry!").format(selection)
return ExitCodes.USER_QUIT
selection = candidates_map[selection]
selection = candidates_map[selection]
username, password = candidate_to_secret(selection)
insert_mode = ';; enter-mode insert' if args.insert_mode else ''