lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scripts: Add Python 3 support to tracing/draw_functrace.py
Date
Use the print function. This maintains Python 2 support and should have
no functional change.

Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
scripts/tracing/draw_functrace.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py
index db40fa04cd51..7d44e796d362 100755
--- a/scripts/tracing/draw_functrace.py
+++ b/scripts/tracing/draw_functrace.py
@@ -20,6 +20,7 @@ Usage:
$ scripts/draw_functrace.py < raw_trace_func > draw_functrace
Then you have your drawn trace in draw_functrace
"""
+from __future__ import print_function


import sys, re
@@ -123,7 +124,7 @@ def main():
tree = tree.getParent(caller)
tree = tree.calls(callee, calltime)

- print CallTree.ROOT
+ print(CallTree.ROOT)

if __name__ == "__main__":
main()
--
2.17.1
\
 
 \ /
  Last update: 2018-07-20 21:36    [W:0.051 / U:3.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site