diff mbox

show_delta: Update script to support python versions 2.5 through 3.3

Message ID 20131009143642.GA12462@woodpecker.gentoo.org (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Pagano Oct. 9, 2013, 2:36 p.m. UTC
Support past and active versions of python while maintaining backward compatibility. Script has been tested on python versions from 2.5.x up to and including 3.3.x.


Signed-off-by: Mike Pagano <mpagano@gentoo.org>
---
 scripts/show_delta | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Michal Marek Oct. 23, 2013, 3:13 p.m. UTC | #1
On Wed, Oct 09, 2013 at 10:36:42AM -0400, Mike Pagano wrote:
> Support past and active versions of python while maintaining backward compatibility. Script has been tested on python versions from 2.5.x up to and including 3.3.x.
> 
> 
> Signed-off-by: Mike Pagano <mpagano@gentoo.org>
> ---
>  scripts/show_delta | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Applied to kbuild.git#misc, thanks.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/show_delta b/scripts/show_delta
index 17df305..e25732b 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -13,7 +13,7 @@  import sys
 import string
 
 def usage():
-	print """usage: show_delta [<options>] <filename>
+	print ("""usage: show_delta [<options>] <filename>
 
 This program parses the output from a set of printk message lines which
 have time data prefixed because the CONFIG_PRINTK_TIME option is set, or
@@ -35,7 +35,7 @@  ex: $ dmesg >timefile
 
 will show times relative to the line in the kernel output
 starting with "NET4".
-"""
+""")
 	sys.exit(1)
 
 # returns a tuple containing the seconds and text for each message line
@@ -94,11 +94,11 @@  def main():
 	try:
 		lines = open(filein,"r").readlines()
 	except:
-		print "Problem opening file: %s" % filein
+		print ("Problem opening file: %s" % filein)
 		sys.exit(1)
 
 	if base_str:
-		print 'base= "%s"' % base_str
+		print ('base= "%s"' % base_str)
 		# assume a numeric base.  If that fails, try searching
 		# for a matching line.
 		try:
@@ -117,13 +117,13 @@  def main():
 					# stop at first match
 					break
 			if not found:
-				print 'Couldn\'t find line matching base pattern "%s"' % base_str
+				print ('Couldn\'t find line matching base pattern "%s"' % base_str)
 				sys.exit(1)
 	else:
 		base_time = 0.0
 
 	for line in lines:
-		print convert_line(line, base_time),
+		print (convert_line(line, base_time),)
 
 main()