Merge pull request #1203 from maxbeth/master

Add a timeout (3 sec) to urlopen within badips.py action
pull/1198/head^2
Yaroslav Halchenko 2015-09-27 00:48:50 -04:00
commit 166e99d2ba
2 changed files with 2 additions and 1 deletions

1
THANKS
View File

@ -71,6 +71,7 @@ kojiro
Lars Kneschke
Lee Clemens
leftyfb (Mike Rushton)
M. Maraun
Manuel Arostegui Ramirez
Marcel Dopita
Mark Edgington

View File

@ -117,7 +117,7 @@ class BadIPsAction(ActionBase):
"""
try:
response = urlopen(
self._Request("/".join([self._badips, "get", "categories"])))
self._Request("/".join([self._badips, "get", "categories"])), None, 3)
except HTTPError as response:
messages = json.loads(response.read().decode('utf-8'))
self._logSys.error(