Skip to content

Commit

Permalink
[FIX][mail_environment][server_environment] Prevent ImportError.
Browse files Browse the repository at this point in the history
Fixes #488.
  • Loading branch information
yajo committed Dec 23, 2016
1 parent ee0b3ec commit f8ec029
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion mail_environment/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 9 additions & 1 deletion server_environment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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)

0 comments on commit f8ec029

Please sign in to comment.