From 9a71b87741f0a79dbe56fa0ab2fab6a957c74216 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 26 Oct 2021 21:02:49 -0400 Subject: Fix name shadowing in benchmarking script --- scripts/serd_bench.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/serd_bench.py b/scripts/serd_bench.py index e6f12cc8..2ecaf8eb 100755 --- a/scripts/serd_bench.py +++ b/scripts/serd_bench.py @@ -22,7 +22,7 @@ class WorkingDirectory: os.chdir(self.working_dir) return self - def __exit__(self, type, value, traceback): + def __exit__(self, exc_type, value, traceback): sys.stderr.write("Leaving directory `%s'\n" % self.working_dir) os.chdir(self.original_dir) @@ -34,9 +34,9 @@ def filename(n): def gen(sp2b_dir, n_min, n_max, step): "Generate files with n_min ... n_max statements if they are not present" - with WorkingDirectory(sp2b_dir) as dir: + with WorkingDirectory(sp2b_dir) as directory: for n in range(n_min, n_max + step, step): - out_path = os.path.join(dir.original_dir, "build", filename(n)) + out_path = os.path.join(directory.original_dir, "build", filename(n)) if not os.path.exists(out_path): subprocess.call(["./sp2b_gen", "-t", str(n), out_path]) -- cgit v1.2.1