summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpran1990 <praneshpg@gmail.com>2014-05-30 15:40:17 -0700
committerpran1990 <praneshpg@gmail.com>2014-05-30 15:40:17 -0700
commitb44b2db1b3f570b67a26ba021b3c089188192f30 (patch)
treec9f2f385fc0a169f0a582fd78a9d927d69380cfa
parent3499d899c81e290b13096d765bbedc25ef5ca0d2 (diff)
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
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Joshua Harlow <harlowja@yahoo-inc.com> Workflow+1: Pranesh Pandurangan <praneshpg@gmail.com> Submitted-by: Jenkins Submitted-at: Tue, 03 Jun 2014 09:56:54 +0000 Reviewed-on: https://review.openstack.org/96974 Project: stackforge/entropy Branch: refs/heads/master
-rw-r--r--entropy/engine.py6
1 files 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):
82 self.futures.append(serializer) 82 self.futures.append(serializer)
83 83
84 # Start react scripts. 84 # Start react scripts.
85 self.futures.append(self.start_react_scripts()) 85 self.futures.extend(self.start_react_scripts())
86 86
87 scheduler = self.executor.submit(self.schedule) 87 scheduler = self.executor.submit(self.schedule)
88 self.futures.append(scheduler) 88 self.futures.append(scheduler)
@@ -177,7 +177,7 @@ class Engine(object):
177 177
178 def repair_modified(self): 178 def repair_modified(self):
179 LOG.info('Repair configuration changed') 179 LOG.info('Repair configuration changed')
180 self.futures.append(self.start_react_scripts()) 180 self.futures.extend(self.start_react_scripts())
181 181
182 def start_watchdog(self, dir_to_watch): 182 def start_watchdog(self, dir_to_watch):
183 event_fn = {self.audit_cfg: self.audit_modified, 183 event_fn = {self.audit_cfg: self.audit_modified,
@@ -199,7 +199,7 @@ class Engine(object):
199 **audit_cfg) 199 **audit_cfg)
200 audit_futures.append(future) 200 audit_futures.append(future)
201 if audit_futures: 201 if audit_futures:
202 self.futures.append(audit_futures) 202 self.futures.extend(audit_futures)
203 except Exception: 203 except Exception:
204 LOG.exception("Could not run all audits in %s at %s", 204 LOG.exception("Could not run all audits in %s at %s",
205 audit_list, execution_time) 205 audit_list, execution_time)