File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,21 @@ def id(self):
3434 # Special case, if we have an environment var set, we could use FT232H
3535 try :
3636 if os .environ ['BLINKA_FT232H' ]:
37- import ftdi1 as ftdi
37+ # we can't have ftdi1 as a dependency cause its wierd
38+ # to install, sigh.
39+ import ftdi1 as ftdi # pylint: disable=import-error
3840 try :
3941 ctx = None
4042 device_list = None
4143 ctx = ftdi .new () # Create a libftdi context.
4244 # Enumerate FTDI devices.
43- count , device_list = ftdi .usb_find_all (ctx , 0 , 0 )
45+ count , _ = ftdi .usb_find_all (ctx , 0 , 0 )
4446 if count < 0 :
4547 raise RuntimeError ('ftdi_usb_find_all returned error %d : %s' %
4648 count , ftdi .get_error_string (self ._ctx ))
4749 if count == 0 :
48- raise RuntimeError ('BLINKA_FT232H environment variable set, but no FT232H device found' )
50+ raise RuntimeError ('BLINKA_FT232H environment variable' + \
51+ 'set, but no FT232H device found' )
4952 finally :
5053 # Make sure to clean up list and context when done.
5154 if ctx is not None :
You can’t perform that action at this time.
0 commit comments