mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26:30 +01:00
Try to fix postgres/mysql test suite error
This commit is contained in:
parent
7a2cf7e13d
commit
00a4e5934b
2 changed files with 4 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ objects already existing in the database.
|
|||
|
||||
"""
|
||||
|
||||
from django.db.utils import OperationalError
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
# limit symbol import from API
|
||||
|
|
@ -38,7 +38,7 @@ try:
|
|||
ChannelDB = ContentType.objects.get(app_label="comms", model="channeldb").model_class()
|
||||
HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_class()
|
||||
Tag = ContentType.objects.get(app_label="typeclasses", model="tag").model_class()
|
||||
except OperationalError:
|
||||
except (OperationalError, ProgrammingError):
|
||||
# this is a fallback used during tests/doc building
|
||||
print("Couldn't initialize create managers - db not set up.")
|
||||
from evennia.objects.models import ObjectDB
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Example: To reach the search method 'get_object_with_account'
|
|||
|
||||
# Import the manager methods to be wrapped
|
||||
|
||||
from django.db.utils import OperationalError
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
# limit symbol import from API
|
||||
|
|
@ -53,7 +53,7 @@ try:
|
|||
ChannelDB = ContentType.objects.get(app_label="comms", model="channeldb").model_class()
|
||||
HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_class()
|
||||
Tag = ContentType.objects.get(app_label="typeclasses", model="tag").model_class()
|
||||
except OperationalError:
|
||||
except (OperationalError, ProgrammingError):
|
||||
# this is a fallback used during tests/doc building
|
||||
print("Couldn't initialize search managers - db not set up.")
|
||||
from evennia.objects.models import ObjectDB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue