|
@@ -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)
|