Skip to content

Commit 44b9876

Browse files
authored
Merge pull request #12944 from rajkan01/usb_msd_greentea_py3
Fix the USB MSD greentea host side pyusb_msd.py script
2 parents 631e81e + b6fa3cb commit 44b9876

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)