Commit dd939b97 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Add recurse flag to dill dump

This ensures that the scope of the function is actually saved.
parent 7e6e4954
......@@ -494,7 +494,7 @@ def func_to_cmd(func, args=None, kwargs=None, tmp_dir=None, clean="never", verbo
if kwargs is None:
kwargs = {}
dill_bytes = BytesIO()
dill.dump((func, args, kwargs), dill_bytes)
dill.dump((func, args, kwargs), dill_bytes, recurse=True)
handle, filename = tempfile.mkstemp(prefix=func.__name__ + '_',
suffix='.py',
......
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