def mount_single_volume(self, only_mount=None):
        """Mounts a volume assuming that the mounted image does not contain a full disk image, but only a
        single volume.

        A new :class:`Volume` object is created based on the disk file and :func:`init` is called on this object.

        This function will typically yield one volume, although if the volume contains other volumes, multiple volumes
        may be returned.
        """

        volume = self.volumes._make_single_subvolume()
        volume.offset = 0

        description = _util.check_output_(['file', '-sL', self.get_fs_path()]).strip()
        if description:
            # description is the part after the :, until the first comma
            volume.fsdescription = description.split(': ', 1)[1].split(',', 1)[0].strip()
            if 'size' in description:
                volume.size = int(re.findall(r'size:? (\d+)', description)[0])
            else:
                volume.size = os.path.getsize(self.get_fs_path())

        volume.flag = 'alloc'
        self.volume_source = 'single'
        self.volumes._assign_disktype_data(volume)

        for v in volume.init(no_stats=True, only_mount=only_mount):  # stats can't  be retrieved from single volumes
            yield v
dataset/ETHPy150Open ralphje/imagemounter/imagemounter/disk.py/Disk.mount_single_volume/original