From 044213c789c4f1ee214da3d70f02352b1aaa8673 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 24 Apr 2013 15:44:06 -0400 Subject: Fixing unit tests --- src/lib/Bcfg2/Server/Plugin/helpers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugin/helpers.py') diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index e5ea5188a..ade14b865 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -6,7 +6,6 @@ import sys import copy import glob import genshi -import logging import operator import lxml.etree import Bcfg2.Server @@ -30,6 +29,7 @@ try: except ImportError: HAS_DJANGO = False + class track_statistics(object): # pylint: disable=C0103 """ Decorator that tracks execution time for the given :class:`Plugin` method with :mod:`Bcfg2.Statistics` for reporting @@ -1221,7 +1221,7 @@ class Specificity(CmpMixin): return "".join(rv) -class SpecificData(object): +class SpecificData(Debuggable): """ A file that is specific to certain clients, groups, or all clients. """ @@ -1237,6 +1237,7 @@ class SpecificData(object): :param encoding: The encoding to use for data in this file :type encoding: string """ + Debuggable.__init__(self) self.name = name self.specific = specific self.data = None @@ -1258,7 +1259,7 @@ class SpecificData(object): except UnicodeDecodeError: self.data = open(self.name, mode='rb').read() except: # pylint: disable=W0201 - LOGGER.error("Failed to read file %s" % self.name) + self.logger.error("Failed to read file %s" % self.name) class EntrySet(Debuggable): -- cgit v1.2.3-1-g7c22