Salome HOME
fix shutil.rmtree(tmp_local_working_dir)
authorChristian Van Wambeke <christian.van-wambeke@cea.fr>
Fri, 25 May 2018 12:30:45 +0000 (14:30 +0200)
committerChristian Van Wambeke <christian.van-wambeke@cea.fr>
Fri, 25 May 2018 12:30:45 +0000 (14:30 +0200)
commands/package.py

index 9a63ecdcb4306ffde1faa9440b4e694876b51cd2..a41c6a4bd9667648c4c8d4e8ee7ba19a4e14ac33 100644 (file)
@@ -1454,7 +1454,8 @@ Please add it in file:
     
     # unconditionaly remove the tmp_local_working_dir
     tmp_local_working_dir = os.path.join(runner.cfg.APPLICATION.workdir, "tmp_package")
-    shutil.rmtree(tmp_local_working_dir)
+    if os.path.isdir(tmp_local_working_dir):
+      shutil.rmtree(tmp_local_working_dir)
 
     # to decide...
     DBG.tofix("make shutil.rmtree(%s) effective" % tmp_working_dir, "", True)