浏览代码

Fix wrapper for undefined function

Yentl Van Tendeloo 8 年之前
父节点
当前提交
cea4b76e92
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 0 1
      bootstrap/model_management.alc
  2. 3 3
      wrappers/modelverse.py

+ 0 - 1
bootstrap/model_management.alc

@@ -313,7 +313,6 @@ Element function model_split(merged_model : Element, models : Element, tracabili
 				new_name = list_read(string_split(key, "/"), 1)
 			else:
 				new_name = key
-			log("Create element " + new_name)
 
 			if (dict_in(result, retyping_key)):
 				original_type = splitted[1]

+ 3 - 3
wrappers/modelverse.py

@@ -63,8 +63,8 @@ mode = MODE_UNCONNECTED
 prev_mode = None
 current_model = None
 
-def _check_value(value):
-    if not isinstance(value, [int, long, float, str, unicode, bool]):
+def _check_type(value):
+    if not isinstance(value, (int, long, float, str, unicode, bool)):
         raise UnsupportedValue("%s : %s" % (value, str(type(value))))
 
 def _dict_to_list(python_dict):
@@ -898,7 +898,7 @@ def service_get(port):
 
 def service_set(port, value):
     """Set a value on a specified port."""
-    _check_value(value)
+    _check_type(value)
     _goto_mode(MODE_SERVICE)
 
     _input(value, port=port)