Fix bug in job.terminate()
authorClifford Wolf <clifford@clifford.at>
Mon, 6 Feb 2017 20:41:26 +0000 (21:41 +0100)
committerClifford Wolf <clifford@clifford.at>
Mon, 6 Feb 2017 20:41:26 +0000 (21:41 +0100)
sbysrc/sby_core.py

index b82234333c74e1566183065129a037a7421a80aa..01723d37a1512c341775dd770637fb6ad1211340 100644 (file)
@@ -335,7 +335,7 @@ class SbyJob:
         return self.models[model_name]
 
     def terminate(self, timeout=False):
-        for task in self.tasks_running:
+        for task in list(self.tasks_running):
             task.terminate(timeout=timeout)
 
     def update_status(self, new_status):