From 51ef5d71032ce137b14665b925c75e788471ca5f Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 28 Jul 2016 16:06:02 +0000 Subject: [PATCH] - disable SSL certificate validation globally to allow self-signed certs --- TLD_Builder/config.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TLD_Builder/config.py b/TLD_Builder/config.py index 663862e..2e86325 100644 --- a/TLD_Builder/config.py +++ b/TLD_Builder/config.py @@ -9,6 +9,7 @@ import path import log import status +import ssl syslog_facilities = { 'kern': syslog.LOG_KERN, @@ -122,6 +123,12 @@ class Builder_Conf: config = Builder_Conf() def init_conf(builder=None): + try: + _create_unverified_https_context = ssl._create_unverified_context + except AttributeError: + pass + else: + ssl._create_default_https_context = _create_unverified_https_context os.environ['LC_ALL'] = "C" status.push("reading builder config") log.builder = builder -- 2.46.0