mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
PEP8 E712 fixes (#21916)
This commit is contained in:
@@ -660,7 +660,7 @@ class Connection(ConnectionBase):
|
||||
raise AnsibleOptionsError('scp_if_ssh needs to be one of [smart|True|False]')
|
||||
if scp_if_ssh == 'smart':
|
||||
methods = ['sftp', 'scp', 'piped']
|
||||
elif scp_if_ssh == True:
|
||||
elif scp_if_ssh is True:
|
||||
methods = ['scp']
|
||||
else:
|
||||
methods = ['sftp']
|
||||
|
||||
@@ -323,7 +323,7 @@ def ipaddr(value, query = '', version = False, alias = 'ipaddr'):
|
||||
if not value:
|
||||
return False
|
||||
|
||||
elif value == True:
|
||||
elif value is True:
|
||||
return False
|
||||
|
||||
# Check if value is a list and parse each element
|
||||
|
||||
@@ -115,7 +115,7 @@ class LookupModule(LookupBase):
|
||||
... flat=0 # returns a dict; default is 1 == string
|
||||
'''
|
||||
|
||||
if HAVE_DNS == False:
|
||||
if HAVE_DNS is False:
|
||||
raise AnsibleError("Can't LOOKUP(dig): module dns.resolver is not installed")
|
||||
|
||||
# Create Resolver object so that we can set NS if necessary
|
||||
|
||||
@@ -39,7 +39,7 @@ class LookupModule(LookupBase):
|
||||
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
|
||||
if HAVE_DNS == False:
|
||||
if HAVE_DNS is False:
|
||||
raise AnsibleError("Can't LOOKUP(dnstxt): module dns.resolver is not installed")
|
||||
|
||||
ret = []
|
||||
|
||||
Reference in New Issue
Block a user