From a9dfb1009d43bc7b984ab0f2ed9924e5e06e8506 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 4 Feb 2017 18:28:11 -0800 Subject: [PATCH] Wikifetch: add a three second timeout in fetch --- Wikifetch/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wikifetch/plugin.py b/Wikifetch/plugin.py index 325a651..0ccbe88 100644 --- a/Wikifetch/plugin.py +++ b/Wikifetch/plugin.py @@ -96,7 +96,7 @@ class Wikifetch(callbacks.Plugin): self.log.debug('Wikifetch: using URL %s', addr) try: - article = utils.web.getUrl(addr) + article = utils.web.getUrl(addr, timeout=3) except utils.web.Error: self.log.exception('Failed to fetch link %s', addr) raise