From c684918ba669a80bc49ab6a14a5b3459ac862746 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 5 Sep 2014 20:00:00 +0200 Subject: [PATCH] Ignore urllib3 warnings about invalid SSL certs since we check them ourselves. --- linkcheck/checker/httpurl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 5e20e108..e62d2637 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -19,6 +19,13 @@ Handle http links. """ import requests +# The validity of SSL certs is ignored to be able +# the check the URL and recurse into it. +# The warning about invalid SSL certs is given to the +# user instead. +import warnings +warnings.simplefilter('ignore', requests.packages.urllib3.exceptions.InsecureRequestWarning) + from cStringIO import StringIO from .. import (log, LOG_CHECK, strformat, mimeutil,