Skip to content

Commit 9b5854e

Browse files
committed
Making linux module compatible for running tests in Windows
1 parent bc5fd2d commit 9b5854e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbed_lstools/linux.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ def _sysfs_block_devices(self, block_devices):
120120
for common_device_name in common_device_names:
121121
sysfs_path = os.path.join(SYSFS_BLOCK_DEVICE_PATH, common_device_name)
122122
full_sysfs_path = os.readlink(sysfs_path)
123-
path_parts = full_sysfs_path.split(os.sep)
123+
path_parts = full_sysfs_path.split('/')
124124

125125
end_index = -1
126126
for index, part in enumerate(path_parts):
127127
if self.udp.search(part):
128-
end_index =index
128+
end_index = index
129129
break
130130

131131
if end_index == -1:

0 commit comments

Comments
 (0)