diff options
| author | saturneric <[email protected]> | 2025-06-11 23:38:21 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-06-11 23:38:21 +0000 |
| commit | 0e99f621a88db810f7f95ccb917cf00924cb6e39 (patch) | |
| tree | 21f3653194dcc5e81bfb0205155a152f727f4cf3 /tools/perf/scripts/python | |
| parent | Merge tag 'v6.15' (diff) | |
| parent | Linux 6.16-rc1 (diff) | |
| download | kernel-0e99f621a88db810f7f95ccb917cf00924cb6e39.tar.gz kernel-0e99f621a88db810f7f95ccb917cf00924cb6e39.zip | |
Merge tag 'v6.16-rc1'
Linux 6.16-rc1
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) + "'" |
