diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-21 14:43:39 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-21 14:43:39 -0400 |
commit | 24f6403f1ba483b813e30ea15446a59090d90d90 (patch) | |
tree | 28ee707cca44ba49a8ce775842e5d890bae38b34 /src/lib/Server/Lint/Comments.py | |
parent | 788d6e5cc035710999d2097c4ef2da69568e8995 (diff) | |
download | bcfg2-24f6403f1ba483b813e30ea15446a59090d90d90.tar.gz bcfg2-24f6403f1ba483b813e30ea15446a59090d90d90.tar.bz2 bcfg2-24f6403f1ba483b813e30ea15446a59090d90d90.zip |
Misc. bcfg2-lint fixes and tweaks:
* fixed bcfg2-lint bug with older pythons
* made bcfg2-lint silent by default on success
* adjusted bcfg2-lint defaults and alerting levels to work better out-of-the-box
Diffstat (limited to 'src/lib/Server/Lint/Comments.py')
-rw-r--r-- | src/lib/Server/Lint/Comments.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/Server/Lint/Comments.py b/src/lib/Server/Lint/Comments.py index 0b50df373..1b75bb25e 100644 --- a/src/lib/Server/Lint/Comments.py +++ b/src/lib/Server/Lint/Comments.py @@ -20,14 +20,14 @@ class Comments(Bcfg2.Server.Lint.ServerPlugin): def required_keywords(self, rtype): """ given a file type, fetch the list of required VCS keywords from the bcfg2-lint config """ - return self.required_items(rtype, "keyword", default=["Id"]) + return self.required_items(rtype, "keyword") def required_comments(self, rtype): """ given a file type, fetch the list of required comments from the bcfg2-lint config """ return self.required_items(rtype, "comment") - def required_items(self, rtype, itype, default=None): + def required_items(self, rtype, itype): """ given a file type and item type (comment or keyword), fetch the list of required items from the bcfg2-lint config """ if itype not in self.config_cache: @@ -38,8 +38,6 @@ class Comments(Bcfg2.Server.Lint.ServerPlugin): global_item = "global_%ss" % itype if global_item in self.config: rv.extend(self.config[global_item].split(",")) - elif default is not None: - rv.extend(default) item = "%s_%ss" % (rtype.lower(), itype) if item in self.config: |