Unify the way backends are defined and loaded, unify the fs_cleanup function

This commit is contained in:
Roberto Rosario
2014-07-01 00:22:31 -04:00
parent 0255ea67b1
commit a9390d55ba
21 changed files with 208 additions and 235 deletions
+12
View File
@@ -0,0 +1,12 @@
from __future__ import absolute_import
from common.utils import load_backend
from .conf.settings import BACKEND, LANGUAGE
try:
language_backend = load_backend(u'.'.join([u'ocr', u'lang', LANGUAGE, u'LanguageBackend']))
except ImportError:
language_backend = None
ocr_backend = load_backend(BACKEND)