Skip to content

Commit

Permalink
fix command RunFunction execution context
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Apr 28, 2022
1 parent 2b0f5f7 commit 0766344
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mara_pipelines/commands/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ..incremental_processing import file_dependencies
from ..logging import logger
from ..contexts import ExecutionContext
from ..contexts.bash import BashExecutionContext

from mara_page import html, _
from .. import pipelines
Expand All @@ -30,7 +31,9 @@ def __init__(self, function: Callable = None, args: [str] = None, file_dependenc
self.args = args or []
self.file_dependencies = file_dependencies or []

def run(self) -> bool:
def run(self, context: ExecutionContext = None) -> bool:
if context is not None and not isinstance(context, BashExecutionContext):
raise ValueError('The context must be of type BashExecutionContext')
dependency_type = 'RunFunction ' + self.function.__name__
if self.file_dependencies:
assert (self.parent)
Expand Down

0 comments on commit 0766344

Please sign in to comment.