Commits

Tino de Bruijn committed 21d0858

Catch TypeError on handlers as they might occur when something is screwed up with the data sent from the board

  • Participants
  • Parent commits a98940e

Comments (0)

Files changed (1)

pyfirmata/pyfirmata.py

             return False
         try:
             handler(*data)
-        except ValueError:
+        except ValueError, TypeError:
+            # TypeError occurs when we pass to many arguments.
+            # ValueError may be thrown when the received data is not correct.
             return True
         return True