mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Unroll the list comprehensions
This commit is contained in:
@@ -275,10 +275,13 @@ class Manager(object):
|
||||
self.log.info('sync: sources=%s -> targets=%s', sources, targets)
|
||||
|
||||
try:
|
||||
sources = [self.providers[source] for source in sources]
|
||||
except KeyError as e:
|
||||
collected = []
|
||||
for source in sources:
|
||||
collected.append(self.providers[source])
|
||||
sources = collected
|
||||
except KeyError:
|
||||
raise Exception('Zone {}, unknown source: {}'.format(zone_name,
|
||||
e))
|
||||
source))
|
||||
|
||||
try:
|
||||
trgs = []
|
||||
@@ -396,10 +399,13 @@ class Manager(object):
|
||||
raise Exception('Zone {} is missing sources'.format(zone_name))
|
||||
|
||||
try:
|
||||
sources = [self.providers[source] for source in sources]
|
||||
except KeyError as e:
|
||||
collected = []
|
||||
for source in sources:
|
||||
collected.append(self.providers[source])
|
||||
sources = collected
|
||||
except KeyError:
|
||||
raise Exception('Zone {}, unknown source: {}'.format(zone_name,
|
||||
e))
|
||||
source))
|
||||
|
||||
for source in sources:
|
||||
if isinstance(source, YamlProvider):
|
||||
|
@@ -20,6 +20,7 @@ from ..record import Record, Update
|
||||
from ..record.geo import GeoCodes
|
||||
from .base import BaseProvider
|
||||
|
||||
# TODO: remove when Python 2.x is no longer supported
|
||||
try:
|
||||
cmp
|
||||
except NameError:
|
||||
|
@@ -13,6 +13,7 @@ from six import string_types, text_type
|
||||
|
||||
from .geo import GeoCodes
|
||||
|
||||
# TODO: remove when Python 2.x is no longer supported
|
||||
try:
|
||||
cmp
|
||||
except NameError:
|
||||
|
Reference in New Issue
Block a user