From b5c75d189c7d9b0fe4f30abe8f8e074c1a1e36dd Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Wed, 9 Oct 2019 16:01:39 -0700 Subject: [PATCH] Convert sources building back out to for x in y from list comprehension --- octodns/manager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/octodns/manager.py b/octodns/manager.py index 1a86336..14a8f07 100644 --- a/octodns/manager.py +++ b/octodns/manager.py @@ -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))