Update `python.call` argument: `func` -> `function`.
@@ -6,7 +6,7 @@ from pyinfra.api import FunctionCommand, operation
@operation
-def call(state, host, func, *args, **kwargs):
+def call(state, host, function, *args, **kwargs):
'''
Execute a Python function within a deploy.
@@ -37,12 +37,12 @@ def call(state, host, func, *args, **kwargs):
'''
- yield FunctionCommand(func, args, kwargs)
+ yield FunctionCommand(function, args, kwargs)
@operation
-def raise_exception(state, host, exception_class, *args, **kwargs):
+def raise_exception(state, host, exception, *args, **kwargs):
def raise_exc(*args, **kwargs): # pragma: no cover
- raise exception_class(*args, **kwargs)
+ raise exception(*args, **kwargs)
yield FunctionCommand(raise_exc, args, kwargs)
