Fixing a lingering bug with removing the conf modules.

This commit is contained in:
Griatch 2012-03-25 19:57:08 +02:00
parent e042366f31
commit 734edbb761
2 changed files with 7 additions and 4 deletions

View file

@ -186,9 +186,12 @@ def at_initial_setup():
run a module settings.AT_INITIAL_SETUP_HOOK_MODULE and will fail run a module settings.AT_INITIAL_SETUP_HOOK_MODULE and will fail
silently if this does not exist or fails to load. silently if this does not exist or fails to load.
""" """
try: modname = settings.AT_INITIAL_SETUP_HOOK_MODULE
mod = __import__(settings.AT_INITIAL_SETUP_HOOK_MODULE, fromlist=[None]) if not modname:
except ImportError: return
try:
mod = __import__(modname, fromlist=[None])
except ImportError, ValueError:
return return
print _(" Running at_initial_setup() hook.") print _(" Running at_initial_setup() hook.")
if mod.__dict__.get("at_initial_setup", None): if mod.__dict__.get("at_initial_setup", None):

View file

@ -11,7 +11,7 @@ active players and so on.
Most of these settings are de Most of these settings are de
""" """
from django.conf import settings
from src.utils import utils from src.utils import utils
MSSP = chr(70) MSSP = chr(70)