narrow down exception catching in block builds

this was obscuring other errors and should have always been narrow scope
This commit is contained in:
Brian Coca 2015-12-11 13:12:24 -05:00
commit d9e510b192

View file

@ -174,7 +174,7 @@ class Role(Base, Become, Conditional, Taggable):
if task_data:
try:
self._task_blocks = load_list_of_blocks(task_data, play=self._play, role=self, loader=self._loader)
except:
except AssertionError:
raise AnsibleParserError("The tasks/main.yml file for role '%s' must contain a list of tasks" % self._role_name , obj=task_data)
handler_data = self._load_role_yaml('handlers')