diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-06-09 18:26:55 +0200 |
---|---|---|
committer | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-06-09 18:54:05 +0200 |
commit | 86e2d052c2320bf12571a5d96b16c2745e1cfc5e (patch) | |
tree | ddd7e116a07fc3126c1941a46c74257a0adae333 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | b5735e5e7102683038a1c18d7c8d982c2aef4f8d (diff) | |
parent | 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff) |
Merge drm/drm-next into drm-xe-next
Backmerging to bring in 6.16
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-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) + "'" |