aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/ssl_support.py
diff options
context:
space:
mode:
authorErik Bray <embray@stsci.edu>2015-12-24 16:16:19 -0500
committerErik Bray <embray@stsci.edu>2015-12-24 16:16:19 -0500
commit9578a0f640dac57f95a391c9f2a1ebdaba1a0846 (patch)
treeec2a69af2f73830dd05b8a24648c027acd472318 /setuptools/ssl_support.py
parent2f2011b3d9e21861f003181ab0c3abb9701df83b (diff)
downloadexternal_python_setuptools-9578a0f640dac57f95a391c9f2a1ebdaba1a0846.tar.gz
external_python_setuptools-9578a0f640dac57f95a391c9f2a1ebdaba1a0846.tar.bz2
external_python_setuptools-9578a0f640dac57f95a391c9f2a1ebdaba1a0846.zip
Prevent exception in atexit handlers when cert store's tempfile
is already cleaned up by py.test.
Diffstat (limited to 'setuptools/ssl_support.py')
-rw-r--r--setuptools/ssl_support.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py
index cc7db067..7394f4f5 100644
--- a/setuptools/ssl_support.py
+++ b/setuptools/ssl_support.py
@@ -223,6 +223,12 @@ def get_win_certfile():
self.addcerts(certs)
atexit.register(self.close)
+ def close(self):
+ try:
+ super(MyCertFile, self).close()
+ except OSError:
+ pass
+
_wincerts = MyCertFile(stores=['CA', 'ROOT'])
return _wincerts.name