File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -1817,23 +1817,20 @@ def detect_single_target(self, info=None):
18171817
18181818 def get_detected_targets (self ):
18191819 targets = []
1820- try :
1821- import mbed_lstools
1822- oldError = None
1823- if os .name == 'nt' :
1824- oldError = ctypes .windll .kernel32 .SetErrorMode (1 ) # Disable Windows error box temporarily. note that SEM_FAILCRITICALERRORS = 1
1825- mbeds = mbed_lstools .create ()
1826- detect_muts_list = mbeds .list_mbeds ()
1827- if os .name == 'nt' :
1828- ctypes .windll .kernel32 .SetErrorMode (oldError )
1829-
1830- for mut in detect_muts_list :
1831- targets .append ({
1832- 'id' : mut ['target_id' ], 'name' : mut ['platform_name' ],
1833- 'mount' : mut ['mount_point' ], 'serial' : mut ['serial_port' ]
1834- })
1835- except (IOError , ImportError , OSError ):
1836- return False
1820+ import mbed_os_tools .detect
1821+ oldError = None
1822+ if os .name == 'nt' :
1823+ oldError = ctypes .windll .kernel32 .SetErrorMode (1 ) # Disable Windows error box temporarily. note that SEM_FAILCRITICALERRORS = 1
1824+ mbeds = mbed_os_tools .detect .create ()
1825+ detect_muts_list = mbeds .list_mbeds ()
1826+ if os .name == 'nt' :
1827+ ctypes .windll .kernel32 .SetErrorMode (oldError )
1828+
1829+ for mut in detect_muts_list :
1830+ targets .append ({
1831+ 'id' : mut ['target_id' ], 'name' : mut ['platform_name' ],
1832+ 'mount' : mut ['mount_point' ], 'serial' : mut ['serial_port' ]
1833+ })
18371834
18381835 return targets
18391836
Original file line number Diff line number Diff line change 3939 "License :: OSI Approved :: Apache Software License" ,
4040 "Operating System :: OS Independent" ,
4141 ),
42+ install_requires = [
43+ "pyserial>=3.0,<4.0" ,
44+ "mbed-os-tools<0.1.0" ,
45+ ]
4246)
You can’t perform that action at this time.
0 commit comments