From 82d2aa0e4c4aad608d79f27ceee3ae428b8e5470 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Wed, 14 May 2014 15:49:58 +0200 Subject: [PATCH] Oops --- snurr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snurr.py b/snurr.py index 1dedbb4..7ee2ca9 100755 --- a/snurr.py +++ b/snurr.py @@ -188,7 +188,8 @@ class IRCActions(): reply = "URL: " url = urlmatch.group() try: - i = urllib2.urlopen(url, timeout=3, headers={'User-Agent': 'snurrbot v0.1'}) + req = urllib2.Request(url, headers={'User-Agent': 'snurrbot v0.1'}) + i = urllib2.urlopen(req) except Exception as e: _log(e) self.bot.msgReply(nick, channel, reply + "Timeout")