Ver código fonte

addOutputListener now also accepts strings, not only lists... fix for Yentl

Simon Van Mierlo 7 anos atrás
pai
commit
a8833d6518

+ 2 - 0
src/python_sccd/python_sccd_runtime/statecharts_core.py

@@ -392,6 +392,8 @@ class Event(object):
     
 class OutputListener(object):
     def __init__(self, port_names):
+        if not isinstance(port_names, list):
+            port_names = [port_names]
         self.port_names = port_names
         self.queue = Queue()