Set Timeout at urlopen to 3 seconds

pull/1203/head^2^2
M. Maraun 2015-07-03 22:42:22 +02:00
parent cf3a1c15a0
commit 6d72602f6b
2 changed files with 2 additions and 1 deletions

1
THANKS
View File

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

View File

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