From 1eedc55344420028088a49da9ab084298ecabbef Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Thu, 9 May 2013 20:17:28 +0200 Subject: [PATCH] boobot: Better HEAD errors --- contrib/boobot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/boobot.py b/contrib/boobot.py index 9657e92a..970f22bc 100755 --- a/contrib/boobot.py +++ b/contrib/boobot.py @@ -92,9 +92,11 @@ class BoobotBrowser(StandardBrowser): r = self.openurl(HeadRequest(url)) body = False except BrowserHTTPError as e: - if 'HTTP Error 501' in unicode(e): + if 'HTTP Error 501' in unicode(e) or 'HTTP Error 405' in unicode(e): r = self.openurl(url) body = True + else: + raise e headers = r.info() content_type = headers.get('Content-Type') try: