Salome HOME
spns #16894 : clean tmp dir at the end of sat package
authorcrouzet <nicolas.crouzet@cea.fr>
Mon, 13 May 2019 12:22:24 +0000 (14:22 +0200)
committercrouzet <nicolas.crouzet@cea.fr>
Mon, 13 May 2019 12:22:24 +0000 (14:22 +0200)
commands/package.py

index bf3fbee67c2763ae56b55503f75992263be78b77..ec2a16cafc30c46b72b7cfda785fb7ffdb336ffd 100644 (file)
@@ -1597,8 +1597,9 @@ Please add it in file:
         if os.path.isdir(tmp_local_working_dir):
             shutil.rmtree(tmp_local_working_dir)
 
-    # have to decide some time
-    DBG.tofix("make shutil.rmtree('%s') effective" % tmp_working_dir, "", DBG.isDeveloper())
+    # remove the tmp directory, unless user has registered as developer
+    if os.path.isdir(tmp_working_dir) and (not DBG.isDeveloper()):
+        shutil.rmtree(tmp_working_dir)
     
     # Print again the path of the package
     logger.write("\n", 2)