diff --git a/mail_environment/__init__.py b/mail_environment/__init__.py index 89dd1478f..18796fef7 100644 --- a/mail_environment/__init__.py +++ b/mail_environment/__init__.py @@ -1,2 +1,10 @@ # -*- coding: utf-8 -*- -from . import env_mail +import logging + +_logger = logging.getLogger(__name__) + +try: + from . import env_mail +except ImportError: + _logger.info("ImportError raised while loading module.") + _logger.debug("ImportError details:", exc_info=True) diff --git a/server_environment/__init__.py b/server_environment/__init__.py index 765b02bda..bdeb91e60 100644 --- a/server_environment/__init__.py +++ b/server_environment/__init__.py @@ -18,4 +18,12 @@ # along with this program. If not, see . # ############################################################################## -from .serv_config import serv_config, setboolean +import logging + +_logger = logging.getLogger(__name__) + +try: + from .serv_config import serv_config, setboolean +except ImportError: + _logger.info("ImportError raised while loading module.") + _logger.debug("ImportError details:", exc_info=True)