From 148239de876a0c8d2fb53fd644ffaabc70540370 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 25 Apr 2014 08:46:59 -0400 Subject: fixed pylint/pep-8 tests --- src/sbin/bcfg2-info | 3 +-- src/sbin/bcfg2-lint | 4 +--- src/sbin/bcfg2-yum-helper | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/sbin') diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 6008f8896..a6c3149bc 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -438,8 +438,7 @@ Bcfg2 client itself.""") automatch = self.setup.cfp.getboolean("properties", "automatch", default=False) pfile = self.plugins['Properties'].entries[pname] - if (not force and - not automatch and + if (not force and not automatch and pfile.xdata.get("automatch", "false").lower() != "true"): print("Automatch not enabled on %s" % pname) else: diff --git a/src/sbin/bcfg2-lint b/src/sbin/bcfg2-lint index 9ceb1dd04..bb96c2023 100755 --- a/src/sbin/bcfg2-lint +++ b/src/sbin/bcfg2-lint @@ -4,7 +4,6 @@ import sys import time -import inspect import logging import Bcfg2.Logger import Bcfg2.Options @@ -136,8 +135,7 @@ def load_plugins(setup): serverplugins = dict() serverlessplugins = dict() for plugin_name, plugin in allplugins.items(): - if [c for c in inspect.getmro(plugin) - if c == Bcfg2.Server.Lint.ServerPlugin]: + if issubclass(plugin, Bcfg2.Server.Lint.ServerPlugin): serverplugins[plugin_name] = plugin else: serverlessplugins[plugin_name] = plugin diff --git a/src/sbin/bcfg2-yum-helper b/src/sbin/bcfg2-yum-helper index dc6a6cc0b..f2bdf2c97 100755 --- a/src/sbin/bcfg2-yum-helper +++ b/src/sbin/bcfg2-yum-helper @@ -67,6 +67,7 @@ class YumHelper(object): resolution. """ self.yumbase.arch.setup_arch(arch=arch) + class DepSolver(YumHelper): """ Yum dependency solver. This is used for operations that only read from the yum cache, and thus operates in cacheonly mode. """ -- cgit v1.2.3-1-g7c22