From e48dd0e14b14b2b85f6c3c37888fc3cf0ffc1e7d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 12 Feb 2016 13:54:04 +0900 Subject: [PATCH] Fix fallback logic in sphinx.utils.images:get_image_size() --- sphinx/util/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/util/images.py b/sphinx/util/images.py index d130ade326..d445acb057 100644 --- a/sphinx/util/images.py +++ b/sphinx/util/images.py @@ -26,7 +26,7 @@ def get_image_size(filename): if size[0] == -1: size = None - if Image: # fallback to PIL + if size is None and Image: # fallback to PIL im = Image.open(filename) size = im.size try: