Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1627581 > unrolled thread

[PATCH] scripts: show_delta: remove deprecated functions

Started byErik Stromdahl <erik.stromdahl@gmail.com>
First post2017-04-20 17:20 +0200
Last post2017-04-20 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] scripts: show_delta: remove deprecated functions Erik Stromdahl <erik.stromdahl@gmail.com> - 2017-04-20 17:20 +0200

#1627581 — [PATCH] scripts: show_delta: remove deprecated functions

FromErik Stromdahl <erik.stromdahl@gmail.com>
Date2017-04-20 17:20 +0200
Subject[PATCH] scripts: show_delta: remove deprecated functions
Message-ID<tym2d-29R-5@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web