Try to mute TLS warnings

This commit is contained in:
Stefan Bethke 2025-05-29 16:32:27 +02:00
commit 0076242349

View file

@ -4,6 +4,7 @@ import ssl
from typing import List, Dict from typing import List, Dict
import requests import requests
import urllib3
from requests.auth import HTTPBasicAuth from requests.auth import HTTPBasicAuth
from hmdooris.AppException import AppException from hmdooris.AppException import AppException
@ -44,6 +45,8 @@ class CCUJack:
self.kvargs['auth'] = HTTPBasicAuth(username, password) self.kvargs['auth'] = HTTPBasicAuth(username, password)
if certpath is not None and certpath != '': if certpath is not None and certpath != '':
self.kvargs['verify'] = certpath self.kvargs['verify'] = certpath
if certpath is True:
urllib3.disable_warnings()
self.locks : Dict[str, CCUJackHmIPDLD] = {} self.locks : Dict[str, CCUJackHmIPDLD] = {}
self.get_all_locks() self.get_all_locks()