def extract_paths(disk_path, disk_root, paths, ignore_nopath):
with guestfs_conn_mount_ro(disk_path, disk_root) as conn:<EOL><INDENT>for (guest_path, host_path) in paths:<EOL><INDENT>msg = ('<STR_LIT>').format(<EOL>guest_path, host_path<EOL>)<EOL>LOGGER.debug(msg)<EOL>try:<EOL><INDENT>_copy_path(conn, guest_path, host_path)<EOL><DEDENT>except ExtractPathNoPathError as err:<EOL><INDENT>if ignore_nopath:<EOL><INDENT>LOGGER.debug('<STR_LIT>', err)<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Extract paths from a disk using guestfs

Args:
    disk_path(str): path to the disk
    disk_root(str): root partition
    paths(list of tuples): files to extract in
        `[(src1, dst1), (src2, dst2)...]` format, if ``srcN`` is a
        directory in the guest, and ``dstN`` does not exist on the host,
        it will be created. If ``srcN`` is a file on the guest, it will be
        copied exactly to ``dstN``
    ignore_nopath(bool): If set to True, ignore paths in the guest that
        do not exit

Returns:
    None

Raises:
    :exc:`~lago.plugins.vm.ExtractPathNoPathError`: if a none existing
        path was found on the guest, and `ignore_nopath` is False.
    :exc:`~lago.plugins.vm.ExtractPathError`: on all other failures.