Make save_stream pass through kwargs (#396)
* make save_stream pass through kwargs * make base save_stream ok with extra [kw]args * make key argument explicit
This commit is contained in:
parent
ddc3b12848
commit
47a5d9752f
@ -94,7 +94,7 @@ class Store(object):
|
|||||||
return s.read()
|
return s.read()
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def save_stream(self, key):
|
def save_stream(self, key, *rest, **kwargs):
|
||||||
"""
|
"""
|
||||||
Return a managed file-like object into which the calling code can write
|
Return a managed file-like object into which the calling code can write
|
||||||
arbitrary data.
|
arbitrary data.
|
||||||
@ -437,8 +437,8 @@ class ManticoreOutput(object):
|
|||||||
self.save_fds(state)
|
self.save_fds(state)
|
||||||
self._store.save_state(state, self._named_key('pkl'))
|
self._store.save_state(state, self._named_key('pkl'))
|
||||||
|
|
||||||
def save_stream(self, *rest):
|
def save_stream(self, key, *rest, **kwargs):
|
||||||
return self._store.save_stream(*rest)
|
return self._store.save_stream(key, *rest, **kwargs)
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def _named_stream(self, name):
|
def _named_stream(self, name):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user