def _find_unused(self, devices):
        for device in devices:
            if not os.path.exists(os.path.join('/sys/block/', device, 'pid')):
                if not os.path.exists(device % '/var/lock/qemu-nbd-%s'):
                    return device
                else:
                    LOG.error(_LE('NBD error - previous umount did not '
                                  'cleanup /var/lock/qemu-nbd-%s.'), device)
        LOG.warning(_LW('No free nbd devices'))
        return None
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/disk/mount/nbd.py/NbdMount._find_unused/swapped operands of `%`