diff options
| author | Leo Yan <leo.yan@arm.com> | 2026-09-30 14:11:39 +0100 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-30 15:34:16 -0300 |
| commit | ccccf88a19322349612d631503af64592e263754 (patch) | |
| tree | 12d22ae2788a4a0f06e400f80a0c310807a3df91 /tools/perf/python | |
| parent | 9456aa05933076d726fb6c31beb528413468e6f8 (diff) | |
| download | linux-next-ccccf88a19322349612d631503af64592e263754.tar.gz linux-next-ccccf88a19322349612d631503af64592e263754.zip | |
perf python: Avoid shadowing exception name in PostgreSQL exporter
During the perf build, pylint reports:
************* Module export-to-postgresql
python/export-to-postgresql.py:319:8: W0621: Redefining name 'e' from outer scope (line 100) (redefined-outer-name)
Rename 'e' to 'db_error' to clear the warning.
Fixes: b1f968c9656a8a87 ("perf python: Port export-to-postgresql to perf module")
Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: Codex:gpt-6
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python')
| -rwxr-xr-x | tools/perf/python/export-to-postgresql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/python/export-to-postgresql.py b/tools/perf/python/export-to-postgresql.py index b6782129354e..9cac64dee361 100755 --- a/tools/perf/python/export-to-postgresql.py +++ b/tools/perf/python/export-to-postgresql.py @@ -316,9 +316,9 @@ class PostgresExporter: # SQL identifiers are double-quoted; escape embedded double quotes by doubling them. db_name = self.dbname.replace('"', '""') self.do_query(f'CREATE DATABASE "{db_name}"') - except Exception as e: + except Exception as db_error: shutil.rmtree(self.output_dir_name, ignore_errors=True) - raise e + raise db_error self.disconnect() self.connect(self.dbname) |
