mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Add comments and use list comprehensions
Per PR review, use list comprehensions as they are prefered in py3 over use of filter. Add comments to describe the building of the zone tree.
This commit is contained in:
@@ -69,8 +69,7 @@ class Zone(object):
|
||||
|
||||
name = record.name
|
||||
|
||||
if not lenient and any(map(lambda sz: name.endswith(sz),
|
||||
self.sub_zones)):
|
||||
if not lenient and any((name.endswith(sz) for sz in self.sub_zones)):
|
||||
if name not in self.sub_zones:
|
||||
# it's a record for something under a sub-zone
|
||||
raise SubzoneRecordException(f'Record {record.fqdn} is under '
|
||||
|
Reference in New Issue
Block a user