mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-04 14:48:08 +00:00
BF: (python 2.[45]) store backends names in a list to use .index later on (Closes gh-83)
.index() got into tuple's API only in 2.6
This commit is contained in:
parent
9510619b7b
commit
5becaf8ef2
3 changed files with 12 additions and 1 deletions
|
|
@ -33,7 +33,9 @@ logSys = logging.getLogger("fail2ban.jail")
|
|||
class Jail:
|
||||
|
||||
#Known backends. Each backend should have corresponding __initBackend method
|
||||
_BACKENDS = ('pyinotify', 'gamin', 'polling')
|
||||
# yoh: stored in a list instead of a tuple since only
|
||||
# list had .index until 2.6
|
||||
_BACKENDS = ['pyinotify', 'gamin', 'polling']
|
||||
|
||||
def __init__(self, name, backend = "auto"):
|
||||
self.__name = name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue