Commit 7b322451 authored by Jason R. Coombs's avatar Jason R. Coombs

Rely on namespacing to discriminate between novel class and parent.

parent 89cbd6c2
...@@ -217,24 +217,24 @@ def once(func): ...@@ -217,24 +217,24 @@ def once(func):
@once @once
def get_win_certfile(): def get_win_certfile():
try: try:
from wincertstore import CertFile import wincertstore
except ImportError: except ImportError:
return None return None
class MyCertFile(CertFile): class CertFile(wincertstore.CertFile):
def __init__(self, stores=()): def __init__(self, stores=()):
CertFile.__init__(self) super(CertFile, self).__init__()
for store in stores: for store in stores:
self.addstore(store) self.addstore(store)
atexit.register(self.close) atexit.register(self.close)
def close(self): def close(self):
try: try:
super(MyCertFile, self).close() super(CertFile, self).close()
except OSError: except OSError:
pass pass
_wincerts = MyCertFile(stores=['CA', 'ROOT']) _wincerts = CertFile(stores=['CA', 'ROOT'])
return _wincerts.name 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