canonical/pylxd

Client(verify=False) is not respected

mklassen opened this issue · 1 comments

If verify is set to False and the environment variables REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE happen to be set, then these environment variables will override the explicit verify=False. This is because in Session.merge_environment_settings the request level verify is merged with the session level verify after the request level verify is obtained for the environment and the default for trust_env is true.

Now that #535 has merged, you should be able to create a requests.Session, set trust_env to False and then pass it into the pylxd.Client which will help isolate you from the environment