Skip to content
Snippets Groups Projects
Commit 6373baa5 authored by q3k's avatar q3k Committed by q3k
Browse files

py: do not leak file descriptor when loading apps

parent 976d4596
No related branches found
No related tags found
No related merge requests found
......@@ -109,9 +109,12 @@ class BundleMetadata:
try:
t = toml.load(f)
except toml.TomlDecodeError as e:
f.close()
raise BundleMetadataCorrupt(str(e))
except Exception as e:
f.close()
raise BundleMetadataCorrupt(str(e))
f.close()
if "app" not in t or type(t["app"]) != dict:
raise BundleMetadataBroken("missing app section")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment