mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
Merge pull request #2515 from ChrisLR/XYMap-Django-Exception
Fix exception leaking when spawning XYRoom Nodes
This commit is contained in:
commit
c482ee3bc1
1 changed files with 5 additions and 3 deletions
|
|
@ -18,8 +18,10 @@ except ImportError as err:
|
|||
|
||||
import uuid
|
||||
from collections import defaultdict
|
||||
|
||||
from django.core import exceptions as django_exceptions
|
||||
from evennia.prototypes import spawner
|
||||
from evennia.utils.utils import make_iter
|
||||
|
||||
from .utils import MAPSCAN, REVERSE_DIRECTIONS, MapParserError, BIGVAL
|
||||
|
||||
NodeTypeclass = None
|
||||
|
|
@ -309,7 +311,7 @@ class MapNode:
|
|||
|
||||
try:
|
||||
nodeobj = NodeTypeclass.objects.get_xyz(xyz=xyz)
|
||||
except NodeTypeclass.DoesNotExist:
|
||||
except django_exceptions.ObjectDoesNotExist:
|
||||
# create a new entity with proper coordinates etc
|
||||
tclass = self.prototype['typeclass']
|
||||
tclass = (f' ({tclass})'
|
||||
|
|
@ -433,7 +435,7 @@ class MapNode:
|
|||
|
||||
try:
|
||||
nodeobj = NodeTypeclass.objects.get_xyz(xyz=xyz)
|
||||
except NodeTypeclass.DoesNotExist:
|
||||
except django_exceptions.ObjectDoesNotExist:
|
||||
# no object exists
|
||||
pass
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue