fail2ban.client.jailreader module

exception fail2ban.client.jailreader.JailDefError

Bases: Exception

class fail2ban.client.jailreader.JailReader(name, force_enable=False, **kwargs)

Bases: ConfigReader

Attributes:
filter
options

Return a list of option names for the given section name.

share_config

Methods

convert([allow_no_files])

Convert read before __opts to the commands stream

read()

Overloads a default (not shared) read of config reader.

get

getBaseDir

getCombined

getName

getOptions

has_option

has_section

isEnabled

merge_defaults

merge_section

sections

setBaseDir

setName

convert(allow_no_files=False)

Convert read before __opts to the commands stream

Parameters:
allow_missingbool

Either to allow log files to be missing entirely. Primarily is used for testing

property filter
getCombined()
getName()
getOptions(addOpts=None)
isEnabled()
property options

Return a list of option names for the given section name.

Parameter withDefault controls the include of names from section [DEFAULT]

read()

Overloads a default (not shared) read of config reader.

To prevent multiple reads of config files with it includes, reads into the config reader, if it was not yet cached/shared by ‘name’.

setName(value)
exception fail2ban.client.jailreader.NoJailError

Bases: ValueError