Skip to contentSkip to conversation

scripts: show_delta: remove deprecated functions

PATCH New Erik Stromdahl 1 participant 1 message Apr 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: show_delta: remove deprecated functions

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

---
 scripts/show_delta | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/show_delta +2 -2
index 5b36500..e386827 100755
@@ -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)
Signature · 1 line
2.7.4