Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion django_inlinecss/css_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ def load(self, path):
"""
Retrieve CSS contents with staticfiles storage
"""
return staticfiles_storage.open(path).read().decode("utf-8")
with staticfiles_storage.open(path) as file:
return file.read().decode("utf-8")