Skip to content

Commit b6fa3cb

Browse files
committed
Fix the USB MSD greentea host side pyusb_msd.py script
1 parent 7698b34 commit b6fa3cb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

TESTS/host_tests/pyusb_msd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,10 @@ def unmount(serial):
185185
return False
186186

187187
@staticmethod
188-
def _disk_path_windows(serial):
189-
serial_decoded = serial.encode("ascii")
188+
def _disk_path_windows(serial):
190189
c = wmi.WMI()
191190
for physical_disk in c.Win32_DiskDrive():
192-
if serial_decoded == physical_disk.SerialNumber:
191+
if serial == physical_disk.SerialNumber:
193192
for partition in physical_disk.associators("Win32_DiskDriveToDiskPartition"):
194193
for logical_disk in partition.associators("Win32_LogicalDiskToPartition"):
195194
return logical_disk.Caption

0 commit comments

Comments
 (0)