AverageJoe89 / hassio-usbip-mounter

21 stars 4 forks source link

Do not crash if device does not exist #7

Open clau-bucur opened 8 months ago

clau-bucur commented 8 months ago

I have my USBIP server running on Windows and I'm sharing a SDR dongle. Seems that the bus-id of the dongle does not remain fixed between restarts, but bounces back and forth between two values: 4-3 and 6-3. But this creates issues because the addon will crash if I have set 4-3 and now after a restart, it's 6-3. I attempted to configure both ids and then it should attach only what is finds. Unfortunatelly this is not happening, and the addon crashes if one of the device is not found.

Is it possible to have it no crash and just move forward, in case a device is not present? With some optional configuration maybe for the device.