No exception:
python3 test-async.py /dev/existing-device
Exception:
python3 test-async.py /dev/unexisting-device
AttributeError: 'Async' object has no attribute '_Async__thread'
After the patch:
python3 test-async.py /dev/existing-device
no exception
python3 test-async.py /dev/unexisting-device
[obd.elm327] [Errno 2] could not open port /dev/unexisting-device:
[Errno 2] No such file or directory: '/dev/unexisting-device'
[obd.obd] Cannot load commands: No connection to car
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:
Before the patch:
No exception:
python3 test-async.py /dev/existing-device
Exception:
python3 test-async.py /dev/unexisting-device
AttributeError: 'Async' object has no attribute '_Async__thread'After the patch:
python3 test-async.py /dev/existing-device
no exceptionpython3 test-async.py /dev/unexisting-device
[obd.elm327] [Errno 2] could not open port /dev/unexisting-device: [Errno 2] No such file or directory: '/dev/unexisting-device' [obd.obd] Cannot load commands: No connection to car