MrYsLab / PyMata

A Python client class library for Interaction with Standard Firmata
GNU Affero General Public License v3.0
95 stars 40 forks source link

Two errant calls to exit() (rather than sys.exit()) in pymata_core.py #39

Closed ericwertz closed 5 years ago

ericwertz commented 5 years ago

During the course of some hitting some of my Windows-specific problems, I've hit runtime errors where exit() is being called, rather than what should be sys.exit() in pymata_core. A quick search finds that there are two such calls currently in pymata_core.py at lines 990 and 1869.

Since we're talking about calls to sys.exit(), there are numerous places where sys.exit(0) is called in non-happy paths that seem to be runtime errors, but for which no diagnostic messages are issued. Any of these that are hit would result in silent deaths, making them hard to track down if they're hit. At least a print() would help, and a full-on runtime error w/stack trace might even be more helpful in some of these contexts.

ericwertz commented 5 years ago

Edit: OOPS - this should have been submitted against pymata-aio. Sorry.