Explorar o código

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

Simon Van Mierlo %!s(int64=7) %!d(string=hai) anos
pai
achega
a8833d6518
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/python_sccd/python_sccd_runtime/statecharts_core.py

+ 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()