digidotcom / xbee-python

Python library to interact with Digi International's XBee radio frequency modules.
Mozilla Public License 2.0
185 stars 93 forks source link

devices: close connection when throwing protocol exception on 'open' #149

Closed daescalona closed 4 years ago

daescalona commented 4 years ago

If there was a protocol missmatch when opening the XBee object connection, an exception was thrown but port remained open. This commit fixes this scenario and closes the connection before throwing the exception.

Signed-off-by: David Escalona david.escalona@digi.com