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

Do not import all ansible errors and fix the exception raised #10704

Merged
merged 1 commit into from
Apr 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions v2/ansible/inventory/dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import os

from ansible import constants as C
from ansible.errors import *
from ansible.errors import AnsibleError

from ansible.inventory.host import Host
from ansible.inventory.group import Group
Expand Down Expand Up @@ -160,7 +160,7 @@ def _merge_groups(self, group, newgroup):

# name
if group.name != newgroup.name:
raise errors.AnsibleError("Cannot merge group %s with %s" % (group.name, newgroup.name))
raise AnsibleError("Cannot merge group %s with %s" % (group.name, newgroup.name))

# depth
group.depth = max([group.depth, newgroup.depth])
Expand Down Expand Up @@ -210,7 +210,7 @@ def _merge_hosts(self,host, newhost):

# name
if host.name != newhost.name:
raise errors.AnsibleError("Cannot merge host %s with %s" % (host.name, newhost.name))
raise AnsibleError("Cannot merge host %s with %s" % (host.name, newhost.name))

# group membership relation
for newgroup in newhost.groups:
Expand Down