aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen/lv2docgen.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-15 12:59:06 -0400
committerDavid Robillard <d@drobilla.net>2022-06-15 13:06:03 -0400
commit27eb30b2fceccc1bde9bd6b76638603dda460ba8 (patch)
tree4d9d335b87d80db7525bd2bf86dc0ba85f4ced75 /lv2specgen/lv2docgen.py
parentd261b2d8ed786b93a37f18ebb87ed14d2e360f56 (diff)
downloadlv2-27eb30b2fceccc1bde9bd6b76638603dda460ba8.tar.xz
lv2specgen: Use scoped file handles
Diffstat (limited to 'lv2specgen/lv2docgen.py')
-rwxr-xr-xlv2specgen/lv2docgen.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lv2specgen/lv2docgen.py b/lv2specgen/lv2docgen.py
index 23a239d..d620a34 100755
--- a/lv2specgen/lv2docgen.py
+++ b/lv2specgen/lv2docgen.py
@@ -133,6 +133,5 @@ if __name__ == '__main__':
raise
print('Writing <%s> documentation to %s' % (plugin, outpath))
- out = open(outpath, 'w')
- out.write(html)
- out.close()
+ with open(outpath, 'w') as out:
+ out.write(html)