Skip to content

Commit

Permalink
Correct the AnsibleError exception to call its superclass's constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger committed Dec 22, 2017
1 parent 235bdfb commit 5a80375
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/ansible/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class AnsibleError(Exception):
'''

def __init__(self, message="", obj=None, show_content=True, suppress_extended_error=False, orig_exc=None):
super(AnsibleError, self).__init__(message)

# we import this here to prevent an import loop problem,
# since the objects code also imports ansible.errors
from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject
Expand Down
1 change: 0 additions & 1 deletion test/units/parsing/test_mod_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,3 @@ def test_multiple_actions(self):
assert err.value.args[0].startswith("conflicting action statements: ")
conflicts = set(err.value.args[0][len("conflicting action statements: "):].split(', '))
assert conflicts == set(('ping', 'shell'))

0 comments on commit 5a80375

Please sign in to comment.