Skip to content

Commit

Permalink
Fix unclosed file
Browse files Browse the repository at this point in the history
fixes #199
  • Loading branch information
petschki committed Sep 9, 2021
1 parent 2aab605 commit 4f1fb0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/199.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix unclosed file when reading manifest.cfg
[petschki]
5 changes: 2 additions & 3 deletions src/plone/app/theming/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,8 @@ def getThemeFromResourceDirectory(resourceDirectory):
"""
name = resourceDirectory.__name__
if resourceDirectory.isFile(MANIFEST_FILENAME):
manifest = getManifest(
resourceDirectory.openFile(MANIFEST_FILENAME), MANIFEST_FORMAT
)
with resourceDirectory.openFile(MANIFEST_FILENAME) as manifest_fp:
manifest = getManifest(manifest_fp, MANIFEST_FORMAT)
else:
manifest = {}

Expand Down

0 comments on commit 4f1fb0d

Please sign in to comment.