pyunifi
pyunifi copied to clipboard
ssl_verify attempt to suppress warnings is broken
This code does not work and also if the caller has already called urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) it prevents that from working either:
if ssl_verify is False:
warnings.simplefilter("default", category=InsecureRequestWarning)
Removing that code from the Controller constructor allows disable_warnings() to do its job again and actually disable the warning.
requests.version '2.21.0' urllib3.version '1.24.1'
pyunifi current git version as of today.
That patch is outdated, simply add
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
after
if ssl_verify is False:
warnings.simplefilter("default", category=InsecureRequestWarning)