Skip to content

Commit 3f80ff6

Browse files
committed
ignore warnings from urllib3
1 parent 1881ef1 commit 3f80ff6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

channelfinder/ChannelFinderClient.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from requests import auth
1313
from requests.adapters import HTTPAdapter
1414
from requests.exceptions import HTTPError
15+
import urllib3
1516
from copy import copy
1617

1718
try:
@@ -52,6 +53,8 @@ def __init__(self, BaseURL=None, username=None, password=None, verify_ssl=True):
5253
self.__session = requests.Session()
5354
self.__session.mount(self.__baseURL, HTTPAdapter())
5455
self.__session.verify = self.__verify_ssl
56+
if not self.__session.verify:
57+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
5558
except Exception as e:
5659
raise RuntimeError("Error creating ChannelFinderClient: " + str(e))
5760

0 commit comments

Comments
 (0)