ENH: Renamed OptionConfigReader to DefinitionInitConfigReader

pull/180/head
Steven Hiscocks 2013-04-21 11:27:32 +01:00
parent 1a43a0bce1
commit e57505e074
3 changed files with 12 additions and 5 deletions

View File

@ -28,12 +28,12 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL" __license__ = "GPL"
import logging, os import logging, os
from configreader import ConfigReader, OptionConfigReader from configreader import ConfigReader, DefinitionInitConfigReader
# Gets the instance of the logger. # Gets the instance of the logger.
logSys = logging.getLogger(__name__) logSys = logging.getLogger(__name__)
class ActionReader(OptionConfigReader): class ActionReader(DefinitionInitConfigReader):
_configOpts = [ _configOpts = [
["string", "actionstart", ""], ["string", "actionstart", ""],

View File

@ -131,7 +131,14 @@ class ConfigReader(SafeConfigParserWithIncludes):
values[option[1]] = option[2] values[option[1]] = option[2]
return values return values
class OptionConfigReader(ConfigReader): class DefinitionInitConfigReader(ConfigReader):
"""Config reader for files with options grouped in [Definition] and
[Init] sections.
Is a base class for readers of filters and actions, where definitions
in jails might provide custom values for options defined in [Init]
section.
"""
_configOpts = [] _configOpts = []

View File

@ -28,12 +28,12 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL" __license__ = "GPL"
import logging, os import logging, os
from configreader import ConfigReader, OptionConfigReader from configreader import ConfigReader, DefinitionInitConfigReader
# Gets the instance of the logger. # Gets the instance of the logger.
logSys = logging.getLogger(__name__) logSys = logging.getLogger(__name__)
class FilterReader(OptionConfigReader): class FilterReader(DefinitionInitConfigReader):
_configOpts = [ _configOpts = [
["string", "ignoreregex", ""], ["string", "ignoreregex", ""],