mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Cleanup more pyflakes warnings (2 real problems)
This commit is contained in:
parent
1fa975d81a
commit
7aa9f6754a
7 changed files with 13 additions and 22 deletions
|
@ -17,8 +17,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
|
||||
HAVE_DNS=False
|
||||
try:
|
||||
import dns.resolver
|
||||
|
@ -27,7 +25,7 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.errors import *
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
# ==============================================================
|
||||
|
@ -58,7 +56,7 @@ class LookupModule(LookupBase):
|
|||
string = 'NXDOMAIN'
|
||||
except dns.resolver.Timeout:
|
||||
string = ''
|
||||
except dns.exception.DNSException as e:
|
||||
except DNSException as e:
|
||||
raise AnsibleError("dns.resolver unhandled exception", e)
|
||||
|
||||
ret.append(''.join(string))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue