Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edit Config.get_required so as to raise error for any blank options.
As it stood, get_required would not raise a ConfigError for strings (the default) if the option was left blank, unlike other data types. A str option that was left blank was parsed as '' and any error catching was left to the tooling. This adds an explicit check for times where get_required() could return an empty string instead of the expected None. If a blank option is a viable choice, I think get(...default="") is a better choice for those situations. I added a set of get_required tests as well. Testing Done: PANTS_DEV=1 ./pants test tests/python/pants_test:all : Success Travis Passed: https://travis-ci.org/pantsbuild/pants/builds/47998589 Reviewed at https://rbcommons.com/s/twitter/r/1638/
- Loading branch information