mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
BF: Fix bad syntax in badips.py action
Taken from https://bugzilla.redhat.com/attachment.cgi?id=895966&action=diff
This commit is contained in:
parent
98daa9d301
commit
db023be09b
1 changed files with 2 additions and 2 deletions
|
|
@ -161,7 +161,7 @@ class BadIPsAction(ActionBase):
|
|||
"/".join([self._badips, "get", "list", category, str(score)]),
|
||||
urlencode({'age': age})])
|
||||
if key:
|
||||
url = "&".join([url, urlencode({"key", key})])
|
||||
url = "&".join([url, urlencode({'key': key})])
|
||||
response = urlopen(self._Request(url))
|
||||
except HTTPError as response:
|
||||
messages = json.loads(response.read().decode('utf-8'))
|
||||
|
|
@ -346,7 +346,7 @@ class BadIPsAction(ActionBase):
|
|||
try:
|
||||
url = "/".join([self._badips, "add", self.category, aInfo['ip']])
|
||||
if self.key:
|
||||
url = "?".join([url, urlencode({"key", self.key})])
|
||||
url = "?".join([url, urlencode({'key': self.key})])
|
||||
response = urlopen(self._Request(url))
|
||||
except HTTPError as response:
|
||||
messages = json.loads(response.read().decode('utf-8'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue