diff --git a/crossflow/tasks.py b/crossflow/tasks.py index ac823c2..958e666 100644 --- a/crossflow/tasks.py +++ b/crossflow/tasks.py @@ -239,6 +239,7 @@ def run(self, *args): Whatever the function returns, with output files converted to FileHandle objects """ + od = os.getcwd() td = tempfile.mkdtemp() os.chdir(td) indict = {} @@ -284,7 +285,7 @@ def run(self, *args): else: outputs.append(v) shutil.rmtree(td, ignore_errors=True) - + os.chdir(od) if len(outputs) == 1: outputs = outputs[0] else: