mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erik Stromdahl <erik.stromdahl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Erik Stromdahl <erik.stromdahl@gmail.com>
Subject: [PATCH] scripts: show_delta: remove deprecated functions
Date: Thu, 20 Apr 2017 17:16:18 +0200	[thread overview]
Message-ID: <1492701378-10344-1-git-send-email-erik.stromdahl@gmail.com> (raw)

Replaced deprecated string functions with newer versions
compatible with Python 3.6.
These functions also work with Python 2 as well.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 scripts/show_delta | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/show_delta b/scripts/show_delta
index 5b36500..e386827 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -46,8 +46,8 @@ def get_time(line):
 		raise ValueError
 
 	# split on closing bracket
-	(time_str, rest) = string.split(line[1:],']',1)
-	time = string.atof(time_str)
+	(time_str, rest) = line[1:].split(']',1)
+	time = float(time_str)
 
 	#print "time=", time
 	return (time, rest)
-- 
2.7.4

                 reply	other threads:[~2017-04-20 15:17 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=1492701378-10344-1-git-send-email-erik.stromdahl@gmail.com \
    --to=erik.stromdahl@gmail.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®