'Parse the WMI packages output.'

def Parse(self, query, result, knowledge_base):

    _ = (query, knowledge_base)
    result = result.ToDict()
    winvolume = rdf_client.WindowsVolume(drive_letter=result.get('DeviceID'), drive_type=result.get('DriveType'))
    try:
        size = int(result.get('Size'))
    except (ValueError, TypeError):
        size = None
    try:
        free_space = int(result.get('FreeSpace'))
    except (ValueError, TypeError):
        free_space = None
    volume = rdf_client.Volume(windowsvolume=winvolume, name=result.get('VolumeName'), file_system_type=result.get('FileSystem'), serial_number=result.get('VolumeSerialNumber'), sectors_per_allocation_unit=1, bytes_per_sector=1, total_allocation_units=size, actual_available_allocation_units=free_space)
    (yield volume)
