diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2013-01-01 13:20:36 +0100 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2013-01-01 13:20:36 +0100 |
| commit | 7cb0cd5afffb8e38930eed7d52bd120176019e71 (patch) | |
| tree | c6134975320040c698ff03784b154f92c0392487 | |
| parent | a4a4b139cd1b2e5dd7a05f195c8990f4d94e882d (diff) | |
Replaced six.reraise with a simple raise.
| -rw-r--r-- | django/core/files/images.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/django/core/files/images.py b/django/core/files/images.py index 3baedda4cc..0d87ae853e 100644 --- a/django/core/files/images.py +++ b/django/core/files/images.py @@ -3,12 +3,10 @@ Utility functions for handling images. Requires PIL, as you might imagine. """ - import zlib -import sys from django.core.files import File -from django.utils import six + class ImageFile(File): """ @@ -30,6 +28,7 @@ class ImageFile(File): self._dimensions_cache = get_image_dimensions(self, close=close) return self._dimensions_cache + def get_image_dimensions(file_or_path, close=False): """ Returns the (width, height) of an image, given an open file or a path. Set @@ -67,7 +66,7 @@ def get_image_dimensions(file_or_path, close=False): if e.args[0].startswith("Error -5"): pass else: - six.reraise(*sys.exc_info()) + raise if p.image: return p.image.size chunk_size = chunk_size*2 |
