Added better error checking for when trying to set an attribute on an object stored in an attribute but which after retrieved and cached was deleted. The fix doesn't fully fix the problem of stale caching but does give more information. Related to Issue 295.

Also fixed a curiously phrased import.
This commit is contained in:
Griatch 2012-10-14 19:29:56 +02:00
parent af160c740e
commit 4830560ac5
2 changed files with 13 additions and 4 deletions

View file

@ -15,6 +15,7 @@ That an object is controlled by a player/user is just defined by its
they control by simply linking to a new object's user property.
"""
from django.conf import settings
from src.typeclasses.typeclass import TypeClass
from src.commands import cmdset, command
__all__ = ("Object", "Character", "Room", "Exit")
@ -728,8 +729,7 @@ class Character(Object):
self.locks.add(";".join(["get:false()", # noone can pick up the character
"call:false()"])) # no commands can be called on character from outside
# add the default cmdset
from settings import CMDSET_DEFAULT
self.cmdset.add_default(CMDSET_DEFAULT, permanent=True)
self.cmdset.add_default(settings.CMDSET_DEFAULT, permanent=True)
# no other character should be able to call commands on the Character.
self.cmdset.outside_access = False