Re: [master] Let dm_node_from_name admit it's defeated.

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

 



Ack.

--
Martin SivÃk
msivak@xxxxxxxxxx
Red Hat Czech
Anaconda team / Brno, CZ

----- Original Message -----
> Related commit: f9761370a84368610d0d9177517b149c3e5d9b4e
> 
> Resolves: rhbz#672603
> ---
> pyanaconda/storage/devicelibs/dm.py | 4 +++-
> pyanaconda/storage/formats/__init__.py | 2 +-
> 2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/pyanaconda/storage/devicelibs/dm.py
> b/pyanaconda/storage/devicelibs/dm.py
> index bd0a46c..02e6a9a 100644
> --- a/pyanaconda/storage/devicelibs/dm.py
> +++ b/pyanaconda/storage/devicelibs/dm.py
> @@ -82,5 +82,7 @@ def dm_node_from_name(map_name):
> # try pyblock
> node = block.getDmNodeFromName(map_name)
> 
> - return node
> + if not node:
> + raise DMError("dm_node_from_name(%s) has failed." % node)
> 
> + return node
> diff --git a/pyanaconda/storage/formats/__init__.py
> b/pyanaconda/storage/formats/__init__.py
> index 4c4e173..46b4aea 100644
> --- a/pyanaconda/storage/formats/__init__.py
> +++ b/pyanaconda/storage/formats/__init__.py
> @@ -400,7 +400,7 @@ class DeviceFormat(object):
> # 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)
> + device = dm_node_from_name(os.path.basename(self.device))
> except DMError:
> device = self.device
> 
> --
> 1.7.3.3
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
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