Mercurial > hg > cropresize
changeset 6:0cd9a1362310
fix bug where PIL lives in different places
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 13 Dec 2010 20:08:15 -0800 |
parents | c89738f3f417 |
children | 230fb4ae30c7 |
files | cropresize/__init__.py setup.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cropresize/__init__.py Sat Mar 06 14:55:04 2010 -0500 +++ b/cropresize/__init__.py Mon Dec 13 20:08:15 2010 -0800 @@ -1,7 +1,10 @@ #!/usr/bin/env python import sys -from PIL import Image +try: + import Image +except ImportError: + from PIL import Image def crop_resize(image, size, exact_size=False): """