Skip to content

Commit 0bd8d6e

Browse files
author
marcusw
committed
Fix for Mac.
1 parent c283d1a commit 0bd8d6e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nxt/locator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ def find_bricks(host=None, name=None):
3333
print >>sys.stderr, "USB module unavailable, not searching there"
3434

3535
try:
36-
from bluetooth import BluetoothError
36+
import bluesock
3737
try:
38-
import bluesock
3938
socks = bluesock.find_bricks(host, name)
4039
for s in socks:
4140
yield s
42-
except (BluetoothError, IOError): #for cases such as no adapter, bluetooth throws IOError, not BluetoothError
41+
except (bluesock.bluetooth.BluetoothError, IOError): #for cases such as no adapter, bluetooth throws IOError, not BluetoothError
4342
pass
4443
except ImportError:
4544
import sys

0 commit comments

Comments
 (0)