mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-02 14:29:10 -07:00
Removing temporary files when not proxing inside urls utils (#35583)
This commit is contained in:
parent
684e953b50
commit
fe067040d1
1 changed files with 14 additions and 0 deletions
|
@ -618,6 +618,10 @@ class SSLValidationHandler(urllib_request.BaseHandler):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not to_add:
|
if not to_add:
|
||||||
|
try:
|
||||||
|
os.remove(to_add_path)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
to_add_path = None
|
to_add_path = None
|
||||||
return (tmp_path, to_add_path, paths_checked)
|
return (tmp_path, to_add_path, paths_checked)
|
||||||
|
|
||||||
|
@ -677,6 +681,16 @@ class SSLValidationHandler(urllib_request.BaseHandler):
|
||||||
|
|
||||||
if not use_proxy:
|
if not use_proxy:
|
||||||
# ignore proxy settings for this host request
|
# ignore proxy settings for this host request
|
||||||
|
if tmp_ca_cert_path:
|
||||||
|
try:
|
||||||
|
os.remove(tmp_ca_cert_path)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
if to_add_ca_cert_path:
|
||||||
|
try:
|
||||||
|
os.remove(to_add_ca_cert_path)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
return req
|
return req
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue