Browse Source

BF: Fix bad syntax in badips.py action

Taken from https://bugzilla.redhat.com/attachment.cgi?id=895966&action=diff
pull/739/head
Steven Hiscocks 11 years ago
parent
commit
db023be09b
  1. 4
      config/action.d/badips.py

4
config/action.d/badips.py

@ -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…
Cancel
Save