harmsm / PyCmdMessenger

Python interface for CmdMessenger arduino serial communication library
MIT License
80 stars 32 forks source link

Bug introduced with multiformat commit #29

Open jikuja opened 7 years ago

jikuja commented 7 years ago

Commit 13d43cf82212e17d5e55dd9313a7f25195b44176 introduced a new bug: format argument can not be None anymore. Changing None to "" made my code work. Fixes: fix code or update documentation

ERROR:CmdEvents:Traceback (most recent call last):
  File "E:\projects\iot\iot-project\gateway\CmdEvents\CmdEvents.py", line 25, in run
    message = self.cmdMessenger.receive()
  File "E:\projects\iot\iot-project\gateway\PyCmdMessenger\PyCmdMessenger.py", line 280, in receive
    arg_format_list = self._treat_star_format(arg_format_list,fields[1:])
  File "E:\projects\iot\iot-project\gateway\PyCmdMessenger\PyCmdMessenger.py", line 306, in _treat_star_format
    num_stars = len([a for a in arg_format_list if a == "*"])
TypeError: 'NoneType' object is not iterable