Commits

Anonymous committed 8049ea5

Avoid ImportError when PIL is not installed on the local machine.

  • Participants
  • Parent commits d92e8e1

Comments (0)

Files changed (2)

kay/ext/testutils/gae_test_base.py

     from google.appengine.api import user_service_stub
     from google.appengine.api.memcache import memcache_stub
     from google.appengine.api.labs.taskqueue import taskqueue_stub
-    from google.appengine.api.images import images_stub
+    try:
+        from google.appengine.api.images import images_stub
+    except ImportError:
+        pass
 
     AUTH_DOMAIN = 'gmail.com'
 

kay/management/test.py

 from google.appengine.api.memcache import memcache_stub
 from google.appengine.api import user_service_stub
 from google.appengine.api.labs.taskqueue import taskqueue_stub
-from google.appengine.api.images import images_stub
+try:
+  from google.appengine.api.images import images_stub
+except ImportError:
+  pass
 
 from kay.conf import settings