Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpreter mode crashes out on empty line #205

Closed
haunab-ornl opened this issue Jul 14, 2023 · 3 comments · Fixed by #207
Closed

Interpreter mode crashes out on empty line #205

haunab-ornl opened this issue Jul 14, 2023 · 3 comments · Fixed by #207

Comments

@haunab-ornl
Copy link

Providing an empty line to the interpreter results in a crash:

 % pkpass
Welcome to PKPass (Public Key Based Password Manager) v2.7.8!
Type ? to list commands
pkpass>
Generic exception caught:
	IndexError: list index out of range
@ginsburgnm
Copy link
Collaborator

yeah, we could do something with the postcmd function like adding the to beginning of the function the following

        if len(line.split()) == 0:
            return Cmd.postcmd(self, stop, line)

but something strange happens when you do that, and it will fix the empty line enter problem, but it will repeat previous commands as well. this would take additional investigation

@carljbai carljbai linked a pull request Aug 7, 2023 that will close this issue
@carljbai
Copy link
Contributor

carljbai commented Aug 7, 2023

#207 has a possible fix that avoids the issue with repeating previous commands.

@seriousbusinessprofessional
Copy link
Collaborator

#207 has a possible fix that avoids the issue with repeating previous commands.

Tested this and it appears to be fixed.

carljbai added a commit that referenced this issue Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants