Skip to content

Commit

Permalink
refactor: move is_boot function to utils file
Browse files Browse the repository at this point in the history
Part of #741
  • Loading branch information
Francisco2002 committed Jan 15, 2025
1 parent 5667d1c commit 9c00fcc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/kernelCI_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ def string_to_json(string: str) -> Optional[dict]:
except json.JSONDecodeError as e:
log_message(e.msg)
return None


def is_boot(path: str | None) -> bool:
return path is not None and (path == "boot" or path.startswith("boot."))

0 comments on commit 9c00fcc

Please sign in to comment.