diff options
-rwxr-xr-x | dlpcvp.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5,6 +5,7 @@ import json import logging import os.path as osp import sqlite3 +import ssl import sys import urllib.request import xml.etree.ElementTree as ET @@ -39,8 +40,10 @@ user = config[OBS_base]['user'] passw = config[OBS_base]['pass'] password_mgr.add_password(OBS_realm, OBS_base, user, passw) -handler = urllib.request.HTTPBasicAuthHandler(password_mgr) -opener = urllib.request.build_opener(handler) +auth_handler = urllib.request.HTTPBasicAuthHandler(password_mgr) +ssl_handler = urllib.request.HTTPSHandler( + context=ssl._create_unverified_context()) +opener = urllib.request.build_opener(auth_handler, ssl_handler) urllib.request.install_opener(opener) TB_EXISTS = """SELECT name FROM sqlite_master |