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

Provide a replacement for Paster BadCommand #17

Open
amol- opened this issue Jul 16, 2017 · 0 comments
Open

Provide a replacement for Paster BadCommand #17

amol- opened this issue Jul 16, 2017 · 0 comments

Comments

@amol-
Copy link
Member

amol- commented Jul 16, 2017

Paster BadCommand is not available and must be handled manually, terminating
with sys.exit(1).

In Paster raising an exception named BadCommand allowed to quit with an error message ( see https://github.com/Pylons/pylons/blob/master/pylons/commands.py#L107 ).

This is no longer possible in gearbox and requires to call sys.exit which abruptly quits the application. raising BadCommand and trapping it into gearbox as a signal that you shoudl gracefully quit was a better pattern.

By default it should quit with a 1 exit code, but it should be possible to provide a custom one when raising the BadComand exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant