From 3fbc9acc515ffc129518933ab8c881e7b75aa093 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 7 Jan 2015 20:10:03 +0100 Subject: [PATCH] Some more work to get modules to load in the right order. --- bin/evennia.py | 5 +++-- evennia/utils/dbserialize.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/evennia.py b/bin/evennia.py index 78807f446..cf2f65de6 100755 --- a/bin/evennia.py +++ b/bin/evennia.py @@ -430,6 +430,9 @@ def init_game_directory(path): # Add gamedir to python path sys.path.insert(0, GAMEDIR) + # Prepare django; set the settings location + os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH + # testing the main library import. If there are errors in importing # the main library, it should show here. importlib.import_module("evennia") @@ -444,8 +447,6 @@ def init_game_directory(path): print ERROR_SETTINGS sys.exit() - # Prepare django; set the settings location - os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH import django # required since django1.7. django.setup() diff --git a/evennia/utils/dbserialize.py b/evennia/utils/dbserialize.py index a89c54e95..4208f2428 100644 --- a/evennia/utils/dbserialize.py +++ b/evennia/utils/dbserialize.py @@ -30,7 +30,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.contrib.contenttypes.models import ContentType from evennia.server.models import ServerConfig from evennia.utils.utils import to_str, uses_database -from evennievenniautils import logger +from evennia.utils import logger __all__ = ("to_pickle", "from_pickle", "do_pickle", "do_unpickle")