Skip to content

Commit 1fff8e4

Browse files
authored
Merge pull request #12 from orionrobots/check-for-arm-#11
Add a check for the usb find
2 parents 92455fe + 8dd47e2 commit 1fff8e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

usb_arm/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class Arm(object):
6464

6565
def __init__(self):
6666
self.dev = usb.core.find(idVendor=0x1267)
67+
if not self.dev:
68+
raise RuntimeError("USB Arm Not found. Ensure it is plugged in and powered on")
6769
self.dev.set_configuration()
6870

6971
def tell(self, msg):

0 commit comments

Comments
 (0)