ソースを参照

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

Simon Van Mierlo 7 年 前
コミット
a8833d6518
1 ファイル変更2 行追加0 行削除
  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()