Skip to content

Commit

Permalink
More linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaretnikov committed May 18, 2024
1 parent 465cd86 commit 3fd785a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion argo_jupyter_scheduler/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ def update_job_status_failure(
logger.exception("Failed to get papermill status")
papermill_status = None

if papermill_status == 127:
status_not_found = 127
if papermill_status == status_not_found:
status_message = "Workflow failed (papermill not found)."
else:
status_message = "Workflow failed."
Expand Down
5 changes: 4 additions & 1 deletion argo_jupyter_scheduler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ def gen_papermill_command_input(
logger.info(f"html_path: {html_path}")
logger.info(f"papermill_status_path: {papermill_status_path}")

papermill = f"( papermill -k {kernel_name} {input_path} {output_path} ; ec=$? ; echo $ec > {papermill_status_path} ; exit $ec )"
papermill = (
f"( papermill -k {kernel_name} {input_path} {output_path} ; "
f"ec=$? ; echo $ec > {papermill_status_path} ; exit $ec )"
)
jupyter = f"jupyter nbconvert --to html {output_path} --output {html_path}"

# It's important that inner quotes are single quotes to prevent shell expansion
Expand Down

0 comments on commit 3fd785a

Please sign in to comment.