Raise ImportError and notify user when specifying a non existant converter graphics backend

This commit is contained in:
Roberto Rosario
2011-03-31 23:57:24 -04:00
parent 18b9964786
commit ff9173ac29

View File

@@ -44,7 +44,10 @@ def _lazy_load(fn):
def _get_backend():
return import_module(GRAPHICS_BACKEND)
backend = _get_backend()
try:
backend = _get_backend()
except ImportError:
raise ImportError('Missing or incorrect converter backend: %s' % GRAPHICS_BACKEND)
def cleanup(filename):
''' tries to remove the given filename. Ignores non-existent files '''