Skip to content

Commit

Permalink
Remove dict comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
slitayem committed Apr 18, 2016
1 parent cca9e16 commit 7b7c863
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions business_rules/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ def fallback(*args, **kwargs):
params = action.get('params') or {}
method = getattr(defined_actions, method_name, fallback)
actions_results[method_name] = method(**params)
return {method_name: result for method_name, result in
actions_results.iteritems() if result}

return dict((method_name, actions_results[method_name]) for method_name
in actions_results.keys() if actions_results.get(method_name))

0 comments on commit 7b7c863

Please sign in to comment.