You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* release/4.0.2:
Bump version to 4.0.2
Do not leak open files after generation
Fix `ImageCacheFile.__repr__` to not send signals
Make generateimages support pre Django 1.8 versions
generateimages: fix taking arguments
README - use Python 3 print function
In Python 3 files should be opened as binary
Fixed#368 use specs directly in ProcessedImageField
Copy file name to clipboardExpand all lines: imagekit/specs/__init__.py
+15-12Lines changed: 15 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -143,23 +143,26 @@ def generate(self):
143
143
raiseMissingSource("The spec '%s' has no source file associated"
144
144
" with it."%self)
145
145
146
-
file_opened_locally=False
147
146
# TODO: Move into a generator base class
148
147
# TODO: Factor out a generate_image function so you can create a generator and only override the PIL.Image creating part. (The tricky part is how to deal with original_format since generator base class won't have one.)
149
-
try:
150
-
img=open_image(self.source)
151
-
exceptValueError:
152
148
153
-
# Re-open the file -- https://code.djangoproject.com/ticket/13750
149
+
closed=self.source.closed
150
+
ifclosed:
151
+
# Django file object should know how to reopen itself if it was closed
0 commit comments