Small bugfixes in the wake of the cmdset changes. Resolves issue 148.

This commit is contained in:
Griatch 2011-03-20 23:14:36 +00:00
parent 9d80284504
commit 75956de7d1
3 changed files with 8 additions and 3 deletions

View file

@ -288,10 +288,10 @@ class CmdSetHandler(object):
if cmdset:
if self.cmdset_stack:
self.cmdset_stack[0] = cmdset
self.mergetype_stack.insert[0] = cmdset.mergetype
self.mergetype_stack[0] = cmdset.mergetype
else:
self.cmdset_stack = [cmdset]
self.mergetype_stack = cmdset.mergetype
self.mergetype_stack = [cmdset.mergetype]
if permanent:
if self.permanent_paths:

View file

@ -223,6 +223,7 @@ class TestPy(CommandTest):
self.execute_cmd("@py 1+2", [">>> 1+2", "<<< 3"])
class TestScripts(CommandTest):
def test_call(self):
script = create.create_script(None, "test")
self.execute_cmd("@scripts", "id")
class TestObjects(CommandTest):
def test_call(self):
@ -272,4 +273,8 @@ class TestWall(CommandTest):
# building.py command tests
class TestScript(CommandTest):
def test_call(self):
self.execute_cmd("@script TestChar = examples.bodyfunctions.BodyFunctions", "Script successfully added")
#TODO

View file

@ -612,7 +612,7 @@ class TypedObject(SharedMemoryModel):
errstring += "\nThis seems to be just the path to a module. You need"
errstring += " to specify the actual typeclass name inside the module too."
errstring += "\n Typeclass '%s' failed to load." % path
defpath = object.__getattribute__(self, default_typeclass_path)
defpath = object.__getattribute__(self, "default_typeclass_path")
errstring += " Using Default class '%s'." % defpath
self.db_typeclass_path = defpath
self.save()