Fix doc build for no-db case

This commit is contained in:
Griatch 2022-06-02 00:09:51 +02:00
parent d9cd9e59f3
commit c39845c43b
2 changed files with 9 additions and 2 deletions

View file

@ -152,6 +152,8 @@ mv-local:
@echo "Documentation built (multiversion + autodocs)."
@echo "To see result, open evennia/docs/build/html/<version>/index.html in a browser."
# note - don't run the following manually, the result will clash with the result
# of the github actions!
deploy:
make _multiversion-deploy
@echo "Documentation deployed."

View file

@ -12,6 +12,7 @@ evennia.OPTION_CLASSES
from pickle import dumps
from django.db.utils import OperationalError, ProgrammingError
from django.conf import settings
from evennia.utils.utils import class_from_module, callables_from_module
from evennia.utils import logger
@ -186,8 +187,12 @@ class GlobalScriptContainer(Container):
for key in self.loaded_data:
self._load_script(key)
# start all global scripts
for script in self._get_scripts():
script.start()
try:
for script in self._get_scripts():
script.start()
except (OperationalError, ProgrammingError):
# this can happen if db is not loaded yet (such as when building docs)
pass
def load_data(self):
"""