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

Update build_component.py #32

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Update build_component.py #32

wants to merge 5 commits into from

Conversation

karthikgvss
Copy link

Added proper error message with link to build instructions.

Added proper error message with link to build instructions.
script is not meant to be called individually, but through \
a wrapper script, build.py. See the Seattle build instructions \
wiki for details: https://seattle.poly.edu/wiki/BuildInstructions"
return 0
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to raise an exception here, or call sys.exit(1) (similar to help_exit()'s approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

The official Python tutorial has a section on exceptions. One approach you may follow here is to log/print information about the requiredscripts/config_build.txt file, and then re-raise the exception with a bare raise (to avoid masking the original exception).

The following article explains why exceptions can lead to cleaner code:
Write Cleaner Python: Use Exceptions

@karthikgvss
Copy link
Author

I am checking if build config exists before creating RUNNABLE directory. This resolves #14 . I am also printing better message resolving #13. Please suggest.

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.

2 participants