From f3dbf1dad9b8ff8de0a1f975ee21a74aff48d963 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 15 Feb 2015 12:02:32 +0100 Subject: [PATCH] Make sure to initialize evennia.init() when using 'evennia shell' --- evennia/server/evennia_launcher.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/evennia/server/evennia_launcher.py b/evennia/server/evennia_launcher.py index 9eb349d6c3..7e94186021 100644 --- a/evennia/server/evennia_launcher.py +++ b/evennia/server/evennia_launcher.py @@ -943,9 +943,15 @@ def main(): server_operation(option, service, args.interactive, args.profiler) elif option != "noop": # pass-through to django manager - init_game_directory(CURRENT_DIR, check_db=False) + check_db = False if option in ('runserver', 'testserver'): print WARNING_RUNSERVER + if option == "shell": + # to use the shell we need to initialize it first, + # and this only works if the database is set up + check_db = True + init_game_directory(CURRENT_DIR, check_db=check_db) + args = [option] kwargs = {} if service not in ("all", "server", "portal"):