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.
2 parents 631e81e + b6fa3cb commit 44b9876Copy full SHA for 44b9876
TESTS/host_tests/pyusb_msd.py
@@ -185,11 +185,10 @@ def unmount(serial):
185
return False
186
187
@staticmethod
188
- def _disk_path_windows(serial):
189
- serial_decoded = serial.encode("ascii")
+ def _disk_path_windows(serial):
190
c = wmi.WMI()
191
for physical_disk in c.Win32_DiskDrive():
192
- if serial_decoded == physical_disk.SerialNumber:
+ if serial == physical_disk.SerialNumber:
193
for partition in physical_disk.associators("Win32_DiskDriveToDiskPartition"):
194
for logical_disk in partition.associators("Win32_LogicalDiskToPartition"):
195
return logical_disk.Caption
0 commit comments