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

Gracefully exit after fmdpy prompt #4

Closed
arsaboo opened this issue May 24, 2022 · 2 comments · Fixed by #5
Closed

Gracefully exit after fmdpy prompt #4

arsaboo opened this issue May 24, 2022 · 2 comments · Fixed by #5

Comments

@arsaboo
Copy link
Contributor

arsaboo commented May 24, 2022

Wondering what is the best way to gracefully exit after the fmdpy: prompt. Otherwise, anything that you enter after the fmdpy gives some error

fmdpy: asldkfjalsdkfjal;sdfjlas
Traceback (most recent call last):
  File "/home/arsaboo/.local/bin/fmdpy", line 8, in <module>
    sys.exit(fmdpy())
  File "/home/arsaboo/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/arsaboo/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/arsaboo/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/arsaboo/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/arsaboo/.local/lib/python3.10/site-packages/fmdpy/__main__.py", line 121, in fmdpy
    c_pool.append(int(indx)-1)
ValueError: invalid literal for int() with base 10: 'asldkfjalsdkfjal;sdfjlas'
@Liupold
Copy link
Owner

Liupold commented May 25, 2022

The prompt is currently in half baked state, Going forward this will be fixed. Sorry can't promise any timeline but you can open up a pull request. exit or quit keyword would work nicely. Error handling on input would also be great. 😃

@arsaboo
Copy link
Contributor Author

arsaboo commented May 25, 2022

@Liupold See #5

This should at least exit gracefully using exit or quit

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.

2 participants