def get_block_data_from_udev(devtype, vg=False):
    devs = []
    output = utils.execute('udevadm', 'info', '--export-db')[0]
    for device in output.split('\n\n'):
        # NOTE(agordeev): add only disks or their partitions

        if 'SUBSYSTEM=block' in device or 'DEVTYPE=%s' % devtype in device:

            # python 2.6 do not support dict comprehension
            device_info = dict((line.partition('=')[0], line.partition('=')[2])
                               for line in device.split('\n')
                               if line.startswith('E:'))

            if _is_valid_dev_type(device_info, vg):
                devs.append(device_info['E: DEVNAME'])

    return devs
dataset/ETHPy150Open openstack/bareon/bareon/utils/hardware.py/get_block_data_from_udev/operator `and` -> `or`