Sfoglia il codice sorgente

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

Simon Van Mierlo 7 anni fa
parent
commit
a8833d6518
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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()