Skip to content

Commit

Permalink
vine: python task: print traceback on error (#4086)
Browse files Browse the repository at this point in the history
  • Loading branch information
btovar authored Mar 5, 2025
1 parent 41e2e2b commit 22e25a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion taskvine/src/bindings/python3/ndcctools/taskvine/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,16 @@ def _fn_wrapper(self, manager, serialize):
except Exception as e:
exec_out = e
error = e
finally:
else:
with open(out, "wb") as f:
if {serialize}:
cloudpickle.dump(exec_out, f)
else:
f.write(exec_out)
finally:
if error:
import traceback
traceback.print_exc()
raise error
"""))
manager._function_buffers[base] = manager.declare_file(name, cache=True)
Expand Down

0 comments on commit 22e25a4

Please sign in to comment.