From 7acfaee8abc7f4dc7f09e975147b96944231db5b Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Wed, 18 Nov 2015 19:25:04 +0100 Subject: Call directly function is_host_resolvable instead do call via framework Reviewed-By: Petr Spacek --- ipalib/plugins/dns.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 7bbb092c8..36e37ed5b 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -1563,9 +1563,7 @@ def check_ns_rec_resolvable(zone, name): elif not name.is_absolute(): # this is a DNS name relative to the zone name = name.derelativize(zone.make_absolute()) - try: - return api.Command['dns_resolve'](unicode(name)) - except errors.NotFound: + if not is_host_resolvable(name): raise errors.NotFound( reason=_('Nameserver \'%(host)s\' does not have a corresponding ' 'A/AAAA record') % {'host': name} -- cgit