diff options
author | David Robillard <d@drobilla.net> | 2021-10-26 21:02:49 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 15:18:05 -0500 |
commit | 9a71b87741f0a79dbe56fa0ab2fab6a957c74216 (patch) | |
tree | 199d693ca1cad45424d8c9a5e859191f1f3a15f3 /scripts/serd_bench.py | |
parent | 17e73683aa446e872fb118487f7dc39436032b3d (diff) | |
download | serd-9a71b87741f0a79dbe56fa0ab2fab6a957c74216.tar.gz serd-9a71b87741f0a79dbe56fa0ab2fab6a957c74216.tar.bz2 serd-9a71b87741f0a79dbe56fa0ab2fab6a957c74216.zip |
Fix name shadowing in benchmarking script
Diffstat (limited to 'scripts/serd_bench.py')
-rwxr-xr-x | scripts/serd_bench.py | 6 |
1 files changed, 3 insertions, 3 deletions
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]) |