Skip to content

Commit

Permalink
Merge pull request ansible#5662 from RSpiertz/update_playbook_error
Browse files Browse the repository at this point in the history
PlayBook: better error message
  • Loading branch information
jctanner committed Feb 4, 2014
2 parents a877b8b + dec6345 commit 253fe7b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/ansible/playbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,17 @@ def __init__(self,

self.SETUP_CACHE = SETUP_CACHE

if playbook is None or callbacks is None or runner_callbacks is None or stats is None:
raise Exception('missing required arguments')
arguments = []
if playbook is None:
arguments.append('playbook')
if callbacks is None:
arguments.append('callbacks')
if runner_callbacks is None:
arguments.append('runner_callbacks')
if stats is None:
arguments.append('stats')
if arguments:
raise Exception('PlayBook missing required arguments: %s' % ', '.join(arguments))

if extra_vars is None:
extra_vars = {}
Expand Down

0 comments on commit 253fe7b

Please sign in to comment.