summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-lint
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbin/bcfg2-lint')
-rwxr-xr-xsrc/sbin/bcfg2-lint13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sbin/bcfg2-lint b/src/sbin/bcfg2-lint
index a6efd0ccb..959a2d8ed 100755
--- a/src/sbin/bcfg2-lint
+++ b/src/sbin/bcfg2-lint
@@ -9,7 +9,6 @@ import Bcfg2.Logger
import Bcfg2.Options
import Bcfg2.Server.Core
import Bcfg2.Server.Lint
-from Bcfg2.Compat import ConfigParser
LOGGER = logging.getLogger('bcfg2-lint')
@@ -88,12 +87,11 @@ def load_plugins(setup):
if setup['args']:
plugin_list = setup['args']
elif "bcfg2-repo-validate" in sys.argv[0]:
- plugin_list = 'Duplicates,RequiredAttrs,Validate'.split(',')
+ plugin_list = 'RequiredAttrs,Validate'.split(',')
+ elif setup['lint_plugins']:
+ plugin_list = setup['lint_plugins']
else:
- try:
- plugin_list = setup.cfp.get('lint', 'plugins').split(',')
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
- plugin_list = Bcfg2.Server.Lint.__all__
+ plugin_list = Bcfg2.Server.Lint.__all__
allplugins = dict()
for plugin in plugin_list:
@@ -144,7 +142,7 @@ def main():
showerrors=Bcfg2.Options.LINT_SHOW_ERRORS,
stdin=Bcfg2.Options.LINT_FILES_ON_STDIN,
schema=Bcfg2.Options.SCHEMA_PATH,
- plugins=Bcfg2.Options.SERVER_PLUGINS)
+ lint_plugins=Bcfg2.Options.LINT_PLUGINS)
optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS)
optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS)
setup = Bcfg2.Options.OptionParser(optinfo)
@@ -156,6 +154,7 @@ def main():
Bcfg2.Logger.setup_logging('bcfg2-info', **log_args)
setup.cfp.read(setup['lint_config'])
+ setup.reparse()
if setup['stdin']:
files = [s.strip() for s in sys.stdin.readlines()]