From: Alexander Vasarab Date: Wed, 10 Feb 2021 07:13:28 +0000 (-0800) Subject: Disable TLS warnings X-Git-Tag: v3.2.0^2~1^2~3 X-Git-Url: https://wylark.com/src/infoex-autowx.git/commitdiff_plain/05ff6eb0591fa21c639721197f6f7c50720e6d33?ds=sidebyside Disable TLS warnings This first came about because there was a problem with NRCS TLS certificates (possibly due to the expiry of the 'AddTrust' root cert). This caused me to examine whether privacy is even necessary of these requests. We're requesting public data for integration into a private system. Thus, privacy is preferred, but not necessary. And therefore, a correct TLS chain is preferred, but not necessary. --- diff --git a/infoex-autowx.py b/infoex-autowx.py index abdf14a..af1ae31 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -29,6 +29,7 @@ import logging import os import sys import time +import urllib3 import importlib.util from ftplib import FTP @@ -47,6 +48,8 @@ __version__ = '3.1.1' LOG = logging.getLogger(__name__) LOG.setLevel(logging.NOTSET) +urllib3.disable_warnings() + def get_parser(): """Return OptionParser for this program""" parser = ArgumentParser() @@ -417,6 +420,7 @@ def setup_infoex_counterparts_mapping(provider): def get_nrcs_data(begin, end, station): """get the data we're after from the NRCS WSDL""" transport = zeep.transports.Transport(cache=zeep.cache.SqliteCache()) + transport.session.verify = False client = zeep.Client(wsdl=station['source'], transport=transport) remote_data = {}