1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

map( to [...]

This commit is contained in:
Ross McFarland
2019-10-09 15:41:18 -07:00
parent 4d0bc29acc
commit 10ad30e7ea
3 changed files with 5 additions and 6 deletions

View File

@@ -84,8 +84,8 @@ class Zone(object):
raise DuplicateRecordException('Duplicate record {}, type {}'
.format(record.fqdn,
record._type))
elif not lenient and (((record._type == 'CNAME' and len(node) > 0) or
('CNAME' in map(lambda r: r._type, node)))):
elif not lenient and ((record._type == 'CNAME' and len(node) > 0) or
('CNAME' in [r._type for r in node])):
# We're adding a CNAME to existing records or adding to an existing
# CNAME
raise InvalidNodeException('Invalid state, CNAME at {} cannot '