diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-19 15:32:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-19 15:32:38 +0200 |
commit | 70139ad9eba06eec22aa4a03d6198dce7b1d7963 (patch) | |
tree | 869cb46a94bfae79f97cf941297b37f0652e6869 /tools/perf/scripts/python | |
parent | 0cb30e3f5e2fdff1c4271330db21cec387d3d85c (diff) | |
parent | 23fdf46589db718d538fa3e65ab0d57362d50b4a (diff) |
Merge v6.12.34linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
-rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py index 121cf61ba1b3..e0b2e7268ef6 100755 --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py @@ -680,7 +680,10 @@ class CallGraphModelBase(TreeModel): s = value.replace("%", "\\%") s = s.replace("_", "\\_") # Translate * and ? into SQL LIKE pattern characters % and _ - trans = string.maketrans("*?", "%_") + if sys.version_info[0] == 3: + trans = str.maketrans("*?", "%_") + else: + trans = string.maketrans("*?", "%_") match = " LIKE '" + str(s).translate(trans) + "'" else: match = " GLOB '" + str(value) + "'" |