linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Legoll <vincent.legoll@gmail.com>
To: linux-btrace@vger.kernel.org
Subject: [PATCH 02/10] bno_plot.py: Use shutil.rmtree() instead of os.system('/bin/rm')
Date: Fri, 20 Mar 2020 21:44:51 +0000	[thread overview]
Message-ID: <20200320214459.7760-3-vincent.legoll@gmail.com> (raw)

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 btt/bno_plot.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
-- 
2.20.1

                 reply	other threads:[~2020-03-20 21:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200320214459.7760-3-vincent.legoll@gmail.com \
    --to=vincent.legoll@gmail.com \
    --cc=linux-btrace@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).