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

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

 



> > --- 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux