bno_plot.py: Use shutil.rmtree() instead of os.system('/bin/rm')
authorVincent Legoll <vincent.legoll@gmail.com>
Fri, 20 Mar 2020 21:44:51 +0000 (22:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 21:53:50 +0000 (15:53 -0600)
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
btt/bno_plot.py

index f05cfdcd7bc7b0458744b6a2a2925ecf686cb652..36fc5242fccd3ddd935e4da6277143a606c09fd5 100644 (file)
@@ -40,7 +40,7 @@ To exit the plotter, enter 'quit' or ^D at the 'gnuplot> ' prompt.
 
 from __future__ import absolute_import
 from __future__ import print_function
-import getopt, glob, os, sys, tempfile
+import getopt, glob, os, sys, tempfile, shutil
 
 verbose        = 0
 cmds   = """
@@ -125,4 +125,4 @@ if __name__ == '__main__':
                sys.exit(1)
 
        os.waitpid(pid, 0)
-       os.system('/bin/rm -rf ' + tmpdir)
+       shutil.rmtree(tmpdir)