1. stringfellow
  2. pyFirmata

Commits

Tino de Bruijn  committed 09b7bb1

Only process sysex command if we have a handler for it

  • Participants
  • Parent commits 971a828
  • Branches default

Comments (0)

Files changed (1)

File pyfirmata/pyfirmata.py

View file
  • Ignore whitespace
         if self._parsing_sysex:
             if data == END_SYSEX:
                 self._parsing_sysex = False
-                self._process_command(self._stored_data[0], self._stored_data[1:])
+                if self._stored_data[0] in self._command_handlers:
+                    self._process_command(self._stored_data[0], self._stored_data[1:])
                 self._stored_data = []
             else:
                 self._stored_data.append(data)