Skip to content

Commit

Permalink
Fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lvoloshyn-sekoia committed Jul 3, 2024
1 parent 115ee8d commit 6282051
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions sekoia_automation/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ def run_action(
class_name: str = typer.Option(..., help="Class name of the action to test"),
args: list[str] = typer.Argument(None, help="Module/Action configuration fields"),
):
kwargs = {
arg.split("=", maxsplit=1)[0]: arg.split("=", maxsplit=1)[1] for arg in args
}
kwargs = (
{arg.split("=", maxsplit=1)[0]: arg.split("=", maxsplit=1)[1] for arg in args}
if args
else {}
)
module_runner = ModuleItemRunner(
module_name=module_name,
class_name=class_name,
Expand Down
2 changes: 1 addition & 1 deletion sekoia_automation/scripts/action_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
data_path: Path = Path("."),
):
self.__class_name = class_name
self.__root_path = root_path # `automation-library` folder by default
self.__root_path = root_path.resolve() # `automation-library` folder by default
self.__module_path = (root_path / module_name).resolve()
self.__data_path = data_path

Expand Down

0 comments on commit 6282051

Please sign in to comment.