Commit 9578a0f6 authored by Erik Bray's avatar Erik Bray

Prevent exception in atexit handlers when cert store's tempfile

is already cleaned up by py.test.
parent 2f2011b3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment