mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
PEP 8 cleanup. (#20789)
* PEP 8 E703 cleanup. * PEP 8 E701 cleanup. * PEP 8 E711 cleanup. * PEP 8 W191 and E101 cleanup.
This commit is contained in:
parent
c29d1e3162
commit
d0d1158c5e
72 changed files with 184 additions and 174 deletions
|
@ -276,8 +276,10 @@ def main():
|
|||
# check if we need to update
|
||||
if rr['ttl'] != ttl or rr['prio'] != priority:
|
||||
data = {}
|
||||
if ttl: data['ttl'] = ttl
|
||||
if priority: data['prio'] = priority
|
||||
if ttl:
|
||||
data['ttl'] = ttl
|
||||
if priority:
|
||||
data['prio'] = priority
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
else:
|
||||
|
@ -291,8 +293,10 @@ def main():
|
|||
'record_type': record_type,
|
||||
'content': value,
|
||||
}
|
||||
if ttl: data['ttl'] = ttl
|
||||
if priority: data['prio'] = priority
|
||||
if ttl:
|
||||
data['ttl'] = ttl
|
||||
if priority:
|
||||
data['prio'] = priority
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
else:
|
||||
|
|
|
@ -332,9 +332,9 @@ class ExoDnsRecord(ExoDns):
|
|||
def present_record(self):
|
||||
record = self.get_record()
|
||||
if not record:
|
||||
record = self._create_record(record);
|
||||
record = self._create_record(record)
|
||||
else:
|
||||
record = self._update_record(record);
|
||||
record = self._update_record(record)
|
||||
return record
|
||||
|
||||
def absent_record(self):
|
||||
|
|
|
@ -209,10 +209,10 @@ def main():
|
|||
module.fail_json(msg='Community not set when using snmp version 2')
|
||||
|
||||
if m_args['version'] == "v3":
|
||||
if m_args['username'] == None:
|
||||
if m_args['username'] is None:
|
||||
module.fail_json(msg='Username not set when using snmp version 3')
|
||||
|
||||
if m_args['level'] == "authPriv" and m_args['privacy'] == None:
|
||||
if m_args['level'] == "authPriv" and m_args['privacy'] is None:
|
||||
module.fail_json(msg='Privacy algorithm not set when using authPriv')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue