style fixes

This commit is contained in:
Artur Barseghyan 2017-03-03 22:55:44 +01:00
parent 2fea8dc6d0
commit 8151f1f1ff

View file

@ -11,7 +11,7 @@ from nine.versions import DJANGO_GTE_1_7
from .conf import get_setting
# In Django a dotted path can be used up to the app config class. In
# such cases the old-school autodiscovery of modules doesn't work but we
# such cases the old-school auto-discovery of modules doesn't work but we
# have a great Django `autodiscover_modules` tool then. In cases if Django
# version is >= 1.7, we use the Django `autodiscover_modules` tool falling back
# to our own implementation of it otherwise.
@ -26,14 +26,14 @@ else:
app_path = __import__(
app, {}, {}, [app.split('.')[-1]]
).__path__
except (AttributeError, TypeError) as e:
logger.debug(str(e))
except (AttributeError, TypeError) as err:
logger.debug(str(err))
continue
try:
imp.find_module(module_name, app_path)
except ImportError as e:
logger.debug(str(e))
except ImportError as err:
logger.debug(str(err))
continue
__import__('{0}.{1}'.format(app, module_name))
@ -60,20 +60,20 @@ def autodiscover():
FORM_ELEMENT_PLUGINS_MODULE_NAME = get_setting(
'FORM_ELEMENT_PLUGINS_MODULE_NAME'
)
)
FORM_HANDLER_PLUGINS_MODULE_NAME = get_setting(
'FORM_HANDLER_PLUGINS_MODULE_NAME'
)
)
THEMES_MODULE_NAME = get_setting(
'THEMES_MODULE_NAME'
)
)
FORM_CALLBACKS_MODULE_NAME = get_setting(
'FORM_CALLBACKS_MODULE_NAME'
)
)
FORM_IMPORTER_PLUGINS_MODULE_NAME = get_setting(
'FORM_IMPORTER_PLUGINS_MODULE_NAME'
)
)
# Discover modules
autodiscover_modules(FORM_ELEMENT_PLUGINS_MODULE_NAME)