We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e85a085 commit 07597b3Copy full SHA for 07597b3
mbed_lstools/linux.py
@@ -47,7 +47,7 @@ def __init__(self, **kwargs):
47
r'(pci|usb)-[0-9a-zA-Z_-]*_(?P<usbid>[0-9a-zA-Z]*)-.*$')
48
self.mmp = re.compile(
49
r'(?P<dev>(/[^/ ]*)+) on (?P<dir>(/[^/ ]*)+) ')
50
- self.udp = re.compile(r'[0-9]+-[0-9]+')
+ self.udp = re.compile(r'^[0-9]+-[0-9]+[^:\s]*$')
51
52
def find_candidates(self):
53
disk_ids = self._dev_by_id('disk')
@@ -126,7 +126,6 @@ def _sysfs_block_devices(self, block_devices):
126
for index, part in enumerate(path_parts):
127
if self.udp.search(part):
128
end_index = index
129
- break
130
131
if end_index == None:
132
logger.debug('Did not find suitable usb folder for usb info: %s', full_sysfs_path)
0 commit comments