浏览代码

Fix add_attr_code

Yentl Van Tendeloo 8 年之前
父节点
当前提交
5174fe0b0a
共有 2 个文件被更改,包括 1 次插入6 次删除
  1. 1 1
      core/mini_modify.alc
  2. 0 5
      wrappers/modelverse.py

+ 1 - 1
core/mini_modify.alc

@@ -152,7 +152,7 @@ String function cmd_attr_add_code(write : Boolean, model : Element, element_name
 			attrs = getAttributeList(model, element_name)
 			if (set_in(dict_keys(attrs), attr_name)):
 				output("Waiting for code constructors...")
-				instantiate_attribute_code(model, element_name, attr_name)
+				instantiate_attribute_code(model, element_name, attr_name, construct_function())
 				return "Success"!
 			else:
 				return "Attribute not found: " + attr_name!

+ 0 - 5
wrappers/modelverse.py

@@ -630,15 +630,10 @@ def attr_assign(model_name, ID, attr, value):
         raise InvalidMode()
 
     try:
-        print("Assign")
         _input(["attr_add", ID, attr, value])
-        print("PREP")
         _handle_output("Success")
-        print("DONE")
     finally:
-        print("EXIT")
         model_exit()
-        print("OK")
 
 def attr_assign_code(model_name, ID, attr, code):
     """Assign a piece of Action Language code to the attribute"""