-
Notifications
You must be signed in to change notification settings - Fork 360
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
Report all errors as messages not as Exceptions #4914
Report all errors as messages not as Exceptions #4914
Conversation
This improves the UX and makes thing more scriptable and more UN*X-like. Tested by manually running these failing commands: ```sh ❯ ./lakefs_export.py --branch asdf --commit_id sdf abc def Cannot set both branch and commit ❯ ./lakefs_export.py abc def Must set one of branch, commit ❯ ./lakefs_export.py --prev_commit_id asdf --commit_id sdf abc def Cannot export diff between two commits. ``` Fixes #4912.
error("Cannot set both branch and commit_id") | ||
else: # not has_branch and not has_commit | ||
error("Must set one of branch, commit_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange indentation here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Turns out we never flake8 this. Opening a new bug to do that, but for now fixed everything flake8 had to complain about. So as punishment PTAL :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks muchly! |
This improves the UX and makes thing more scriptable and more UN*X-like.
Tested by manually running these failing commands:
Fixes #4912.