Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't fail with KeyError 'guests' if now guests are defined for a host #226

Closed
thekorn opened this issue Nov 26, 2014 · 1 comment
Closed
Assignees
Labels

Comments

@thekorn
Copy link
Collaborator

thekorn commented Nov 26, 2014

Traceback (most recent call last):
  File "/home/markus/devel/.virtualenvs/devops/local/lib/python2.7/site-packages/fabric/main.py", line 743, in main
    *args, **kwargs
  File "/home/markus/devel/.virtualenvs/devops/local/lib/python2.7/site-packages/fabric/tasks.py", line 409, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/home/markus/devel/.virtualenvs/devops/local/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/markus/devel/.virtualenvs/devops/local/lib/python2.7/site-packages/littlechef/runner.py", line 115, in nodes_with_tag
    nodes = [n['name'] for n in nodes]
  File "/home/markus/devel/.virtualenvs/devops/local/lib/python2.7/site-packages/littlechef/lib.py", line 166, in get_nodes_with_tag
    for guest in n['virtualization']['guests']:
KeyError: 'guests'

line [0] needs a .get('guests', [])

[0] https://github.com/tobami/littlechef/blob/master/littlechef/lib.py#L166

@thekorn thekorn added the bug label Nov 26, 2014
@thekorn thekorn self-assigned this Nov 26, 2014
tobami added a commit that referenced this issue Nov 26, 2014
littlechef.lib: don't fail when no guests are defined (Fixes: #226)
@tobami
Copy link
Owner

tobami commented Nov 26, 2014

Closed by #227

@tobami tobami closed this as completed Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants