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

Convert sources building back out to for x in y from list comprehension

This commit is contained in:
Ross McFarland
2019-10-09 16:01:39 -07:00
parent 10ad30e7ea
commit b5c75d189c

View File

@@ -283,7 +283,10 @@ class Manager(object):
self.log.info('sync: sources=%s -> targets=%s', sources, targets)
try:
sources = [self.providers[source] for source in sources]
collected = []
for source in sources:
collected.append(self.providers[source])
sources = collected
except KeyError:
raise ManagerException('Zone {}, unknown source: {}'
.format(zone_name, source))
@@ -405,7 +408,10 @@ class Manager(object):
.format(zone_name))
try:
sources = [self.providers[source] for source in sources]
collected = []
for source in sources:
collected.append(self.providers[source])
sources = collected
except KeyError:
raise ManagerException('Zone {}, unknown source: {}'
.format(zone_name, source))