From b44b2db1b3f570b67a26ba021b3c089188192f30 Mon Sep 17 00:00:00 2001 From: pran1990 Date: Fri, 30 May 2014 15:40:17 -0700 Subject: [PATCH] Change some usage of list.append to list.extend In some places, we were appending a list to a list, when the idea was to extend. Change-Id: Ifb60fbd57796ec05ed104ff04d51f4d76193be40 --- entropy/engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entropy/engine.py b/entropy/engine.py index 8482de2..ca80070 100644 --- a/entropy/engine.py +++ b/entropy/engine.py @@ -82,7 +82,7 @@ class Engine(object): self.futures.append(serializer) # Start react scripts. - self.futures.append(self.start_react_scripts()) + self.futures.extend(self.start_react_scripts()) scheduler = self.executor.submit(self.schedule) self.futures.append(scheduler) @@ -177,7 +177,7 @@ class Engine(object): def repair_modified(self): LOG.info('Repair configuration changed') - self.futures.append(self.start_react_scripts()) + self.futures.extend(self.start_react_scripts()) def start_watchdog(self, dir_to_watch): event_fn = {self.audit_cfg: self.audit_modified, @@ -199,7 +199,7 @@ class Engine(object): **audit_cfg) audit_futures.append(future) if audit_futures: - self.futures.append(audit_futures) + self.futures.extend(audit_futures) except Exception: LOG.exception("Could not run all audits in %s at %s", audit_list, execution_time)