mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-28 18:34:44 +00:00
Fix or disable pylint's no-else-return.
Fixed usage of `else` right after return, or disable pylint evaluation when it would play against code readability.
This commit is contained in:
@@ -404,10 +404,9 @@ class DNSZoneModule(FreeIPABaseModule):
|
||||
ip_version = ip.version
|
||||
if ip_version == 4:
|
||||
return u'.'.join(items[4 - prefixlen // 8:])
|
||||
elif ip_version == 6:
|
||||
if ip_version == 6:
|
||||
return u'.'.join(items[32 - prefixlen // 4:])
|
||||
else:
|
||||
self.fail_json(msg="Invalid IP version for reverse zone.")
|
||||
self.fail_json(msg="Invalid IP version for reverse zone.")
|
||||
|
||||
def get_zone(self, zone_name):
|
||||
get_zone_args = {"idnsname": zone_name, "all": True}
|
||||
|
||||
Reference in New Issue
Block a user