Browse Source

Unroll the list comprehensions

pull/373/head
cclauss 7 years ago
parent
commit
c8b261a409
3 changed files with 14 additions and 6 deletions
  1. +12
    -6
      octodns/manager.py
  2. +1
    -0
      octodns/provider/route53.py
  3. +1
    -0
      octodns/record/__init__.py

+ 12
- 6
octodns/manager.py View File

@ -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):


+ 1
- 0
octodns/provider/route53.py View File

@ -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:


+ 1
- 0
octodns/record/__init__.py View File

@ -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:


Loading…
Cancel
Save