[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Use a different method to get the sysfs_path for device-mapper devices (#665643).



> > --- a/pyanaconda/storage/formats/__init__.py
> > +++ b/pyanaconda/storage/formats/__init__.py
> > @@ -396,7 +396,15 @@ class DeviceFormat(object):
> >      @property
> >      def majorminor(self):
> >          """A string suitable for using as a pseudo-unique ID in kickstart."""
> > -        sysfs_path = get_sysfs_path_by_name(self.device)
> > +
> > +        # If this is a device-mapper device, we have to get the DM node and
> > +        # build the sysfs path from that.
> > +        try:
> > +            device = dm_node_from_name(self.device)
> 
> Since self.device is a full path this will never work -- just pass
> self.device's basename.

If I were less lazy, I'd attach a screenshot here showing you that it
did, in fact, work.

> > +        except:
> > +            device = self.device
> 
> You can just catch DMError here.

Yeah, the concern was DMError vs. pyblock.DMError vs.
HatePythonModulePaths.DMError, etc.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]