Re: [PATCH 03/47] Remove partedUtils.get_partition_drive()

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

 



On Wed, 2009-02-11 at 14:53 -1000, David Cantrell wrote:
> This function is just returns the device name without the /dev/
> at the beginning.  No need for a function.
> ---
> diff --git a/autopart.py b/autopart.py
> index b1c7644..d6fda51 100644
> --- a/autopart.py
> +++ b/autopart.py
> @@ -1160,7 +1160,7 @@ def doClearPartAction(anaconda, partitions, diskset):
>                  partitions.deleteDependentRequests(old)
>                  partitions.removeRequest(old)
>  
> -                drive = partedUtils.get_partition_drive(part)
> +                drive = part.geometry.device.path[5:]

We could improve readability by using os.path.basename instead of the
slice. The same is true throughout the patch.


_______________________________________________
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