New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw ImportError on shared library load failure #17

Merged
merged 1 commit into from May 8, 2012

Conversation

2 participants
@conkiztador
Contributor

conkiztador commented May 1, 2012

If the MagickWand library isn't installed, wand triggers an AttributeError when it gets to this line:

library.NewMagickWand.restype = ctypes.c_void_p

This exception falls through all the way to the orignal import of wand, e.g.:

from wand.image import Image

This pull request catches the AttributeError and raises an ImportError instead, so this can be cleanly handled by the module that imports wand.

dahlia added a commit that referenced this pull request May 8, 2012

@dahlia dahlia merged commit d17e9f4 into emcconville:master May 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment