diff options
author | David Robillard <d@drobilla.net> | 2022-08-09 16:32:05 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-09 16:32:05 -0400 |
commit | 503ad506f919b425f7812f08615eb5c6af00f63c (patch) | |
tree | d32fec52cbb5d1db2ab86129900db74ec1a90b11 | |
parent | 315fd611e5896eb9c2a3f45793695db1b7ef9203 (diff) | |
download | lv2-503ad506f919b425f7812f08615eb5c6af00f63c.tar.xz |
Fix syntax check on Windows
-rwxr-xr-x | scripts/lv2_check_syntax.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lv2_check_syntax.py b/scripts/lv2_check_syntax.py index d1b72dc..391e4e1 100755 --- a/scripts/lv2_check_syntax.py +++ b/scripts/lv2_check_syntax.py @@ -57,12 +57,15 @@ def run(serdi, filenames): for filename in filenames: rel_path = os.path.relpath(filename) - with tempfile.NamedTemporaryFile(mode="w") as out: + with tempfile.NamedTemporaryFile(mode="w", delete=False) as out: + out_name = out.name command = [serdi, "-o", "turtle", rel_path] subprocess.check_call(command, stdout=out) - if _check_file_equals(rel_path, out.name): - status = 1 + if _check_file_equals(rel_path, out_name): + status = 1 + + os.remove(out_name) return status |