Browse Source

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
changes/74/96974/1
pran1990 5 years ago
parent
commit
b44b2db1b3
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      entropy/engine.py

+ 3
- 3
entropy/engine.py View File

@@ -82,7 +82,7 @@ class Engine(object):
82 82
         self.futures.append(serializer)
83 83
 
84 84
         # Start react scripts.
85
-        self.futures.append(self.start_react_scripts())
85
+        self.futures.extend(self.start_react_scripts())
86 86
 
87 87
         scheduler = self.executor.submit(self.schedule)
88 88
         self.futures.append(scheduler)
@@ -177,7 +177,7 @@ class Engine(object):
177 177
 
178 178
     def repair_modified(self):
179 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 182
     def start_watchdog(self, dir_to_watch):
183 183
         event_fn = {self.audit_cfg: self.audit_modified,
@@ -199,7 +199,7 @@ class Engine(object):
199 199
                                               **audit_cfg)
200 200
                 audit_futures.append(future)
201 201
             if audit_futures:
202
-                self.futures.append(audit_futures)
202
+                self.futures.extend(audit_futures)
203 203
         except Exception:
204 204
             LOG.exception("Could not run all audits in %s at %s",
205 205
                           audit_list, execution_time)

Loading…
Cancel
Save