Prevent server from reconnecting to Portal mid-shutdown

This commit is contained in:
Griatch 2018-01-20 13:19:06 +01:00
parent d6105f6d6c
commit 9422c6314d
3 changed files with 23 additions and 11 deletions

View file

@ -210,7 +210,8 @@ class Evennia(object):
Optimize some SQLite stuff at startup since we
can't save it to the database.
"""
if ((".".join(str(i) for i in django.VERSION) < "1.2" and settings.DATABASES.get('default', {}).get('ENGINE') == "sqlite3") or
if ((".".join(str(i) for i in django.VERSION) < "1.2" and
settings.DATABASES.get('default', {}).get('ENGINE') == "sqlite3") or
(hasattr(settings, 'DATABASES') and
settings.DATABASES.get("default", {}).get('ENGINE', None) ==
'django.db.backends.sqlite3')):