Skip to content

Commit f8b4c81

Browse files
authored
Merge pull request #416 from Mentalab-hub/APIS-1530-no-clean-disconnect-of-BLE-devices-in-Explore-desktop
Handle AttributeError when stream interface is None
2 parents eb29624 + 7d57649 commit f8b4c81

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/explorepy/parser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ def _stream_loop(self):
204204
except EOFError:
205205
logger.info('End of file')
206206
self.stop_streaming()
207+
except AttributeError:
208+
if self.stream_interface is None:
209+
# device already disconnected
210+
pass
207211
except Exception as error:
208212
logger.critical('Unexpected error: ', error)
209213
self.stop_streaming()

0 commit comments

Comments
 (0)