All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: show_delta: remove deprecated functions
@ 2017-04-20 15:16 Erik Stromdahl
  0 siblings, 0 replies; only message in thread
From: Erik Stromdahl @ 2017-04-20 15:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Erik Stromdahl

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-20 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 15:16 [PATCH] scripts: show_delta: remove deprecated functions Erik Stromdahl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.