[blivet:master 10/10] Replace with a semantically equivalent chunk.
David Lehman
dlehman at redhat.com
Wed Mar 26 17:23:50 UTC 2014
On Wed, 2014-03-26 at 12:24 -0400, mulhern wrote:
> This was motivated by a complaint about unused variable path.
ACK
>
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
> blivet/devices.py | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index 50c8dd1..25cffbe 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -1310,12 +1310,9 @@ class PartitionDevice(StorageDevice):
> def _setPartedPartition(self, partition):
> """ Set this PartitionDevice's parted Partition instance. """
> log_method_call(self, self.name)
> - if partition is None:
> - path = None
> - elif isinstance(partition, parted.Partition):
> - path = partition.path
> - else:
> - raise ValueError("partition must be a parted.Partition instance")
> +
> + if partition is not None and not isinstance(partition, parted.Partition):
> + raise ValueError("partition must be None or a parted.Partition instance")
>
> log.debug("device %s new partedPartition %s", self.name, partition)
> self._partedPartition = partition
More information about the anaconda-patches
mailing list