diff --git a/sorl/thumbnail/base.py b/sorl/thumbnail/base.py index 19418b890..b826fed10 100644 --- a/sorl/thumbnail/base.py +++ b/sorl/thumbnail/base.py @@ -98,7 +98,7 @@ def get_thumbnail(self, file_, geometry_string, **options): # We have to check exists() because the Storage backend does not # overwrite in some implementations. - if settings.THUMBNAIL_FORCE_OVERWRITE or not thumbnail.exists(): + if not thumbnail.exists(): try: source_image = default.engine.get_image(source) except IOError as e: diff --git a/sorl/thumbnail/conf/defaults.py b/sorl/thumbnail/conf/defaults.py index 9c413a735..83637e93d 100644 --- a/sorl/thumbnail/conf/defaults.py +++ b/sorl/thumbnail/conf/defaults.py @@ -113,7 +113,3 @@ # Should we flatten images by default (fixes a lot of transparency issues with # imagemagick) THUMBNAIL_FLATTEN = False - -# Whenever we will check an existing thumbnail exists and avoid to overwrite or not. -# Set this to true if you have an slow .exists() implementation on your storage backend of choice. -THUMBNAIL_FORCE_OVERWRITE = False diff --git a/tests/.coveragerc b/tests/.coveragerc index 5dbf23c10..9df71046a 100644 --- a/tests/.coveragerc +++ b/tests/.coveragerc @@ -1,5 +1,8 @@ [run] source = sorl +exclude_lines = + pragma: no cover + if __name__ == .__main__.: omit = */sorl-thumbnail/sorl/__init__.py @@ -7,9 +10,4 @@ omit = */sorl/thumbnail/conf/__init__.py */sorl/thumbnail/admin/compat.py */sorl/thumbnail/admin/__init__.py - */sorl/thumbnail/compat.py - -[report] -exclude_lines = - pragma: no cover - if __name__ == .__main__.: + */sorl/thumbnail/compat.py \ No newline at end of file