Commit 0bf80229 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

Implement context manager in SED warehouse

parent ce569173
......@@ -33,6 +33,12 @@ class SedWarehouse(object):
# Cache for modules
self.module_cache = {}
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.close()
def get_module_cached(self, name, **kwargs):
"""Get the SED module using the internal cache.
......
Supports Markdown
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