Do not overwrite config.sby in reusedir mode
authorClifford Wolf <clifford@clifford.at>
Fri, 15 Mar 2019 18:36:13 +0000 (19:36 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 20 Mar 2019 18:09:00 +0000 (19:09 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
sbysrc/sby_core.py

index 631524cd57af6af1b24264d761d744a74078d38f..59f18ef764fced7860a82884bc587f05fcb411f3 100644 (file)
@@ -191,9 +191,10 @@ class SbyJob:
             print(line, file=self.logfile)
         self.logfile.flush()
 
-        with open("%s/config.sby" % workdir, "w") as f:
-            for line in sbyconfig:
-                print(line, file=f)
+        if not reusedir:
+            with open("%s/config.sby" % workdir, "w") as f:
+                for line in sbyconfig:
+                    print(line, file=f)
 
     def taskloop(self):
         for task in self.tasks_pending: