mirror of https://github.com/fail2ban/fail2ban
ENH: Renamed OptionConfigReader to DefinitionInitConfigReader
parent
1a43a0bce1
commit
e57505e074
|
@ -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", ""],
|
||||||
|
|
|
@ -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 = []
|
||||||
|
|
||||||
|
|
|
@ -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", ""],
|
||||||
|
|
Loading…
Reference in New Issue