Silva Issue Tracker Archive: Message8257

 This tracker has been migrated to Launchpad. Please post new messages at: https://bugs.launchpad.net/silva.
Author sacco
Recipients faassen, kitblake, sacco
Date 2006-01-24.17:44:49
Content
As far as I recall, apart from the test which clemens fixed, the PIL dependency
was confined to the ExtFile tests.

If you want to remove this dependency, a dumb fix is simply to wrap everything
which depends on PIL in:
+        try:
+            from PIL import Image
+        except ImportError:
+            pass
+        else:
+            ...

or else (if there are several things together) to use:
+        try:
+            from PIL import Image
+            have_PIL = True
+        except ImportError:
+            have_PIL = False

and
+        if have_PIL:
            ...
+        else:
+           pass

For the sake of ... actually I'm not really sure why I did it ... I patched this
for ExtFile 1.4.4 (patch uploaded), but I did it rather fast so if anybody wants
to use it it might be worth checking that it looks sensible.
Files
File nameUploaded
24_ExtFile-tests.patch sacco, 2006-01-24.17:44:50
History
Date User Action Args
2006-01-24 17:44:50saccosetmessageid: <1138121090.23.0.469716197879.issue1383@infrae.com>
2006-01-24 17:44:50saccosetrecipients: + sacco, faassen, kitblake
2006-01-24 17:44:50saccolinkissue1383 messages
2006-01-24 17:44:50saccocreate