Fixes to initial_startup.

This commit is contained in:
Griatch 2015-01-18 21:40:14 +01:00
parent 1a73f86690
commit 786a97a5b0

View file

@ -24,13 +24,15 @@ def get_god_player():
""" """
Creates the god user and don't take no for an answer. Creates the god user and don't take no for an answer.
""" """
god_player = None
while not god_player:
try: try:
god_player = PlayerDB.objects.get(id=1) god_player = PlayerDB.objects.get(id=1)
except PlayerDB.DoesNotExist: except PlayerDB.DoesNotExist:
print "\nCreate a superuser below. The superuser is Player #1, the 'owner' account of the server.\n" txt = "\n\nNo superuser exists yet. The superuser is the 'owner'\n" \
django.core.management.call_command("createsuperuser", interactive=True) "account on the Evennia server. Create a new superuser using\n" \
"the command\n\n" \
" evennia createsuperuser\n\n" \
"Follow the prompts, then restart the server."
raise Exception(txt)
return god_player return god_player