From 6d72602f6b25aee10a3e0744635d3090a6415518 Mon Sep 17 00:00:00 2001 From: "M. Maraun" Date: Fri, 3 Jul 2015 22:42:22 +0200 Subject: [PATCH 1/2] Set Timeout at urlopen to 3 seconds --- THANKS | 1 + config/action.d/badips.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/THANKS b/THANKS index 5ae86a3c..133bd987 100644 --- a/THANKS +++ b/THANKS @@ -71,6 +71,7 @@ kojiro Lars Kneschke Lee Clemens leftyfb (Mike Rushton) +M. Maraun Manuel Arostegui Ramirez Marcel Dopita Mark Edgington diff --git a/config/action.d/badips.py b/config/action.d/badips.py index c2a239f5..58e64990 100644 --- a/config/action.d/badips.py +++ b/config/action.d/badips.py @@ -116,7 +116,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( From 2895d981fa8b91cc6ea2bb74f325453c48dfb31d Mon Sep 17 00:00:00 2001 From: "M. Maraun" Date: Fri, 3 Jul 2015 22:42:22 +0200 Subject: [PATCH 2/2] Set Timeout at urlopen to 3 seconds --- THANKS | 1 + config/action.d/badips.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/THANKS b/THANKS index 7bf723c5..68c7af48 100644 --- a/THANKS +++ b/THANKS @@ -71,6 +71,7 @@ kojiro Lars Kneschke Lee Clemens leftyfb (Mike Rushton) +M. Maraun Manuel Arostegui Ramirez Marcel Dopita Mark Edgington diff --git a/config/action.d/badips.py b/config/action.d/badips.py index a1df00a3..99e1866a 100644 --- a/config/action.d/badips.py +++ b/config/action.d/badips.py @@ -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(