LocalRuntime: no crash if zombie PLC prevents erasing workdir
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 20 Aug 2024 00:02:27 +0200
changeset 3967 8d82aa6e9dd9
parent 3966 8cc6f56c3710
child 3968 d2aecbb377ae
LocalRuntime: no crash if zombie PLC prevents erasing workdir
LocalRuntimeMixin.py
--- a/LocalRuntimeMixin.py	Mon Aug 19 23:58:01 2024 +0200
+++ b/LocalRuntimeMixin.py	Tue Aug 20 00:02:27 2024 +0200
@@ -51,7 +51,10 @@
             # shutdown local runtime
             self.local_runtime.kill(gently=False)
             # clear temp dir
-            shutil.rmtree(self.local_runtime_tmpdir)
+            try:
+                shutil.rmtree(self.local_runtime_tmpdir)
+            except:
+                pass
 
             self.local_runtime = None