[rhinstaller/blivet/pulls/32 master] Master services
vpodzime
installerbot-noreply at redhat.com
Wed Mar 4 11:17:11 UTC 2015
> @@ -148,46 +148,15 @@ def __str__(self):
>
> @property
> def packages(self):
> - """ List of packages required to manage devices of this type.
> -
> - This list includes the packages required by this device's
> - format type as well those required by all of its parent
> - devices.
> - """
> packages = super(StorageDevice, self).packages
> - packages.extend(self.format.packages)
> - for parent in self.parents:
> - for package in parent.format.packages:
> - if package not in packages:
> - packages.append(package)
> -
> - return packages
> -
> - @property
> - def services(self):
> - """ List of services required to manage devices of this type.
> -
> - This list includes the services required by this device's
> - format type as well those required by all of its parent
> - devices.
> - """
> - services = super(StorageDevice, self).services
> - services.extend(self.format.services)
> - for parent in self.parents:
> - for service in parent.format.services:
> - if service not in services:
> - services.append(service)
> -
> - return services
> + return packages + [p for p in self.format.packages if p not in packages]
Any reason for using + and list comprehension instead of extend() and generator in this particular case?
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/32#discussion_r25767421
More information about the anaconda-patches
mailing list