From: Vincent Legoll Date: Fri, 20 Mar 2020 21:44:51 +0000 (+0100) Subject: bno_plot.py: Use shutil.rmtree() instead of os.system('/bin/rm') X-Git-Tag: blktrace-1.3.0~19 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=edb0360a20a18c0244909dc1a39015f05710c5f5;p=blktrace.git bno_plot.py: Use shutil.rmtree() instead of os.system('/bin/rm') Signed-off-by: Vincent Legoll Signed-off-by: Jens Axboe --- diff --git a/btt/bno_plot.py b/btt/bno_plot.py index f05cfdc..36fc524 100644 --- a/btt/bno_plot.py +++ b/btt/bno_plot.py @@ -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)