Skip to content

Commit

Permalink
Merge pull request #200 from plone/issue-199
Browse files Browse the repository at this point in the history
Fix unclosed file
  • Loading branch information
jensens committed Sep 9, 2021
2 parents 2aab605 + 4f1fb0d commit 28d4365
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 28d4365

Please sign in to comment.