Browse Source

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

pull/384/head
Ross McFarland 6 years ago
parent
commit
b5c75d189c
No known key found for this signature in database GPG Key ID: 61C10C4FC8FE4A89
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      octodns/manager.py

+ 8
- 2
octodns/manager.py 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))


Loading…
Cancel
Save