brendan-w / python-OBD

OBD-II serial module for reading engine data
GNU General Public License v2.0
1.02k stars 360 forks source link

Avoiding Async exception on serial port failure #142

Closed Ircama closed 5 years ago

Ircama commented 5 years ago

Fix obd.Async() exception when failing to open the serial device.

Fixed exception: AttributeError: 'Async' object has no attribute '_Async__thread'

Fixes https://github.com/brendan-w/python-OBD/issues/67

Testing program:

import obd
import sys
connection = obd.Async(sys.argv[1])

Before the patch:

After the patch: