소스 검색

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

Simon Van Mierlo 8 년 전
부모
커밋
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()