mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Skip network driver when searching for mbed disk
This commit is contained in:
@ -99,18 +99,19 @@ def AutodetectUploadPort(*args, **kwargs): # pylint: disable=unused-argument
|
||||
return fnmatch(port, pattern)
|
||||
|
||||
def _look_for_mbed_disk():
|
||||
msdlabels = ("mbed", "nucleo", "frdm", "microbit", "node")
|
||||
msdlabels = ("mbed", "nucleo", "frdm", "microbit")
|
||||
for item in util.get_logicaldisks():
|
||||
if not _is_match_pattern(item['disk']):
|
||||
if item['disk'].startswith("/net") or not _is_match_pattern(
|
||||
item['disk']):
|
||||
continue
|
||||
if (item['name'] and
|
||||
any([l in item['name'].lower() for l in msdlabels])):
|
||||
return item['disk']
|
||||
mbed_pages = [
|
||||
join(item['disk'], n) for n in ("mbed.htm", "mbed.html")
|
||||
]
|
||||
if any([isfile(p) for p in mbed_pages]):
|
||||
return item['disk']
|
||||
if (item['name'] and
|
||||
any([l in item['name'].lower() for l in msdlabels])):
|
||||
return item['disk']
|
||||
return None
|
||||
|
||||
def _look_for_serial_port():
|
||||
|
Reference in New Issue
Block a user