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

deploy: print error message if values file not found #41

Merged
merged 3 commits into from
Feb 8, 2020

Conversation

christiansiegel
Copy link
Member

No description provided.

@christiansiegel christiansiegel changed the title print error message if values file not found deploy: print error message if values file not found Feb 8, 2020
Copy link
Member

@joachimprinzbach joachimprinzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure wether to use sys.exit or raise an exception with the message?

@christiansiegel
Copy link
Member Author

Raising an exception is a bit ugly, don't you think?

@joachimprinzbach
Copy link
Member

imo sys.exit is ugly - but i wrote my first line of pythin on wednesday, so up to you to choose the better solution. As long as the caller gets an appropriate message and exit code im fine with either solution

@joachimprinzbach
Copy link
Member

Just for consistency: https://github.com/baloise-incubator/gitopscli/blob/master/gitopscli/commands/sync_apps.py#L137
Then this should be changes as well

@joachimprinzbach
Copy link
Member

One option: throw exceptions with messages and catch them globally. Handle them there, log the message and exit

@christiansiegel
Copy link
Member Author

sys.exit is not the worst, e.g. try-finally still works. But handling the exceptions globally is even better, true.

@christiansiegel christiansiegel merged commit d411d6c into master Feb 8, 2020
@christiansiegel christiansiegel deleted the feat/deploy-handle-missing-file branch February 8, 2020 16:01
m4rc0z pushed a commit that referenced this pull request Jun 12, 2020
…ing-file

deploy: print error message if values file not found
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 this pull request may close these issues.

None yet

2 participants