Skip to content

Commit

Permalink
propagate return value from @Deploy decorator
Browse files Browse the repository at this point in the history
e.g. this allows writing code like:

  @Deploy
  def ripgrep(**kwargs):
      return apt.packages('ripgrep', **kwargs)

  res = ripgrep()
  if res.changed:
       # do something else
  • Loading branch information
karlicoss authored and Fizzadar committed Jun 27, 2021
1 parent dc8265b commit 83cad06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyinfra/api/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ def decorated_func(*args, **kwargs):
data=deploy_data,
deploy_op_order=deploy_op_order,
):
func(*args, **kwargs)
return func(*args, **kwargs)

return decorated_func

0 comments on commit 83cad06

Please sign in to comment.