diff options
author | Erik Bray <embray@stsci.edu> | 2015-12-24 16:16:19 -0500 |
---|---|---|
committer | Erik Bray <embray@stsci.edu> | 2015-12-24 16:16:19 -0500 |
commit | 9578a0f640dac57f95a391c9f2a1ebdaba1a0846 (patch) | |
tree | ec2a69af2f73830dd05b8a24648c027acd472318 /setuptools/ssl_support.py | |
parent | 2f2011b3d9e21861f003181ab0c3abb9701df83b (diff) | |
download | external_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.py | 6 |
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 |