Skip to content

Commit e09ae6b

Browse files
committed
Fix error: scanning wasn't possible on devices without bluetooth chipset
1 parent 351515c commit e09ae6b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sw/wulpus/interface_direct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ async def get_available(self) -> List[ConnectionOption]:
5252
d.name), "type": ConnectionType.BLE}
5353
for d in self._devices
5454
]
55-
except OSError:
56-
print("OSError during Bluetooth discovery - Adapter probably disabled")
55+
except (OSError, BleakError):
56+
print("Error during Bluetooth discovery - Adapter probably disabled")
5757
return []
5858

5959
async def connect(self, device: Optional[ListPortInfo] = None, device_str: Optional[str] = None) -> bool:

0 commit comments

Comments
 (0)