diff options
author | Amrith Kumar <amrith@amrith.org> | 2016-11-03 16:26:53 -0400 |
---|---|---|
committer | Amrith Kumar <amrith@amrith.org> | 2016-11-14 13:12:15 -0500 |
commit | da2dc0afac6dd2acd498f4c650669af08fb179dd (patch) | |
tree | 88e02d686b5ccefac70df3cb8a8a385b3336cf76 /tools | |
parent | 42187aefcb4434390b54c22a19798440c32c726a (diff) | |
download | trove-da2dc0afac6dd2acd498f4c650669af08fb179dd.tar.gz |
when pylint has an error loading the config, it should fail
When someone has a pylint config file that has an error such as when a
merge goes bad, loading the file fails, and pylint motors along
happily with the default file (i.e. nothing ignored) and this is
confusing. Unless you happen to catch the little error that it prints
out.
Instead, just bomb out with an error.
Change-Id: Ie94dda35652f2a8f06502af72b68be73d61fc94a
Closes-Bug: 1639040
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/trove-pylint.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/trove-pylint.py b/tools/trove-pylint.py index c2d7f3dc..a31d9db9 100755 --- a/tools/trove-pylint.py +++ b/tools/trove-pylint.py @@ -79,16 +79,8 @@ class Config(object): indent=2, separators=(',', ': ')) def load(self, filename=DEFAULT_CONFIG_FILE): - self.config = self.default_config - - try: - with open(filename) as fp: - _c = json.load(fp, encoding="utf-8") - - self.config = _c - except Exception: - print("An error occured loading configuration, using default.") - return self + with open(filename) as fp: + self.config = json.load(fp, encoding="utf-8") def get(self, attribute): return self.config[attribute] |