[rhinstaller/anaconda/pulls/286 master] Translate virtio vendor id into "Virtio Block Device"

dashea installerbot-noreply at redhat.com
Wed Aug 12 15:49:15 UTC 2015


> @@ -122,3 +122,21 @@ def checkDiskSelection(storage, selected_disks):
>                             "unselected": ",".join(missing)})
>  
>      return errors
> +
> +def getDiskDescription(disk):
> +    """ Return a string describing the disk.
> +
> +        :param :class:`blivet.devices.DiskDevice` disk: disk object
> +        :returns: A string describing the disk
> +        :rtype: str
> +
> +        This function tries to create a user friendly string describing
> +        the disk. Usually this is made of up the vendor and model strings
> +        from sysfs, with a few exceptions:
> +
> +        Virtio Block Device is used when the vendor is set to 0x1af4
> +    """
> +    if disk.vendor == "0x1af4":
> +        return "Virtio Block Device"
> +
> +    return disk.description()

This is the part jenkins is complaining about. Extra parenthesis?

-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/286#discussion_r36876283


More information about the anaconda-patches mailing list