mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
map( to [...]
This commit is contained in:
@@ -903,10 +903,10 @@ class DynProvider(BaseProvider):
|
||||
# Sort the values for consistent ordering so that we can compare
|
||||
values = sorted(values, key=_dynamic_value_sort_key)
|
||||
# Ensure that weight is included and if not use the default
|
||||
values = list(map(lambda v: {
|
||||
values = [{
|
||||
'value': v['value'],
|
||||
'weight': v.get('weight', 1),
|
||||
}, values))
|
||||
} for v in values]
|
||||
|
||||
# Walk through our existing pools looking for a match we can use
|
||||
for pool in pools:
|
||||
|
||||
@@ -326,8 +326,7 @@ class OvhProvider(BaseProvider):
|
||||
splitted = value.split('\\;')
|
||||
found_key = False
|
||||
for splitted_value in splitted:
|
||||
sub_split = list(map(lambda x: x.strip(),
|
||||
splitted_value.split("=", 1)))
|
||||
sub_split = [x.strip() for x in splitted_value.split("=", 1)]
|
||||
if len(sub_split) < 2:
|
||||
return False
|
||||
key, value = sub_split[0], sub_split[1]
|
||||
|
||||
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user