[blivet:all] Set sysfsPath attribute before calling Device constructor (#1150147)
Brian C. Lane
bcl at redhat.com
Fri Oct 17 18:08:44 UTC 2014
On Fri, Oct 17, 2014 at 12:53:06PM -0400, mulhern wrote:
> Device constructor sets parents, but MDRaidArrayDevice's _addParent()
> method requires that sysfsPath attribute be present.
>
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
> blivet/devices.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index 2d89c51..7ed131a 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -567,13 +567,17 @@ class StorageDevice(Device):
>
> self.exists = exists
> self.uuid = uuid
> +
> + # Set sysfsPath before super call as MDRaidArrayDevice._addParent()
> + # reads sysfsPath.
> + self.sysfsPath = sysfsPath
> +
> Device.__init__(self, name, parents=parents)
>
> self._format = None
> self._size = Size(util.numeric_type(size))
> self.major = util.numeric_type(major)
> self.minor = util.numeric_type(minor)
> - self.sysfsPath = sysfsPath
> self._serial = serial
> self._vendor = vendor
> self._model = model
> --
> 1.9.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Ack
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list