Infinidat / infi.diskmanagement

Windows Disk Management wrapping in Python
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

"def get_volume(self)" always return Volume4 in 4 - volume(partitions) disk for all partitions #1

Open miegs74 opened 10 years ago

miegs74 commented 10 years ago

original: def compare_extent(extent): return extent.DiskNumber == disk._number and \ from_large_integer(extent.StartingOffset) >= partition.get_start_offset_in_bytes() and \ from_large_integer(extent.ExtentLength) <= partition.get_size_in_bytes() return any(compare_extent(extent) for extent in actual)

this works:

def compare_extent(extent): return extent.DiskNumber == disk._number and \ from_large_integer(extent.StartingOffset) == partition.get_start_offset_in_bytes() and \ from_large_integer(extent.ExtentLength) == partition.get_size_in_bytes() return any(compare_extent(extent) for extent in actual)