Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Oct 31, 2024
1 parent ef261e2 commit 0ab00be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions sdk/src/beta9/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:


@contextmanager
def handle_error(print_traceback: bool = False):
def handle_error():
exit_code = 0
try:
yield
Expand All @@ -201,8 +201,7 @@ def handle_error(print_traceback: bool = False):
exit_code = 1
finally:
if exit_code != 0:
if print_traceback:
print(traceback.format_exc())
print(traceback.format_exc())
sys.exit(exit_code)


Expand Down
2 changes: 1 addition & 1 deletion sdk/src/beta9/runner/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _monitor_task(


@json_output_interceptor(task_id=config.task_id)
@handle_error(print_traceback=True)
@handle_error()
@pass_channel
def main(channel: Channel):
function_stub: FunctionServiceStub = FunctionServiceStub(channel)
Expand Down

0 comments on commit 0ab00be

Please sign in to comment.