From d76a7373abe8e9413f30eeb2fbaf54d1d4136d39 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 14 May 2013 13:30:06 -0400 Subject: bcfg2-lint: fixed unit tests --- src/lib/Bcfg2/Server/Lint/__init__.py | 7 +++++-- src/sbin/bcfg2-lint | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/Bcfg2/Server/Lint/__init__.py b/src/lib/Bcfg2/Server/Lint/__init__.py index d06347cf6..390ec208f 100644 --- a/src/lib/Bcfg2/Server/Lint/__init__.py +++ b/src/lib/Bcfg2/Server/Lint/__init__.py @@ -9,6 +9,9 @@ import lxml.etree import fcntl import termios import struct +from Bcfg2.Compat import walk_packages + +plugins = [m[1] for m in walk_packages(path=__path__)] def _ioctl_GWINSZ(fd): # pylint: disable=C0103 @@ -253,14 +256,14 @@ class ErrorHandler(object): logfunc(line) -class ServerlessPlugin(Plugin): +class ServerlessPlugin(Plugin): # pylint: disable=W0223 """ Base class for bcfg2-lint plugins that are run before the server starts up (i.e., plugins that check things that may prevent the server from starting up). """ pass -class ServerPlugin(Plugin): +class ServerPlugin(Plugin): # pylint: disable=W0223 """ Base class for bcfg2-lint plugins that check things that require the running Bcfg2 server. """ diff --git a/src/sbin/bcfg2-lint b/src/sbin/bcfg2-lint index 9ccee1e1b..9a98eaaaa 100755 --- a/src/sbin/bcfg2-lint +++ b/src/sbin/bcfg2-lint @@ -93,7 +93,7 @@ def load_plugins(setup): elif setup['lint_plugins']: plugin_list = setup['lint_plugins'] else: - plugin_list = Bcfg2.Server.Lint.__all__ + plugin_list = Bcfg2.Server.Lint.plugins allplugins = dict() for plugin in plugin_list: -- cgit v1.2.3-1-g7c22