Merge "mypy: Allow mypy to pass with requests-packaged urllib3"

This commit is contained in:
Zuul 2022-01-22 00:20:57 +00:00 committed by Gerrit Code Review
commit f18af98aee

View File

@ -296,10 +296,9 @@ class VolumeManager(manager.CleanableManager,
if self.configuration.suppress_requests_ssl_warnings:
LOG.warning("Suppressing requests library SSL Warnings")
requests.packages.urllib3.disable_warnings(
requests.packages.urllib3.exceptions.InsecureRequestWarning)
requests.packages.urllib3.disable_warnings(
requests.packages.urllib3.exceptions.InsecurePlatformWarning)
rpu = requests.packages.urllib3 # type: ignore
rpu.disable_warnings(rpu.exceptions.InsecureRequestWarning)
rpu.disable_warnings(rpu.exceptions.InsecurePlatformWarning)
self.key_manager = key_manager.API(CONF)
self.driver = importutils.import_object(