This was motivated by a complaint about unused variable path.
Signed-off-by: mulhern amulhern@redhat.com --- blivet/devices.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py index 50c8dd1..bfca67a 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -1310,11 +1310,8 @@ 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: + + if not isinstance(partition, parted.Partition): raise ValueError("partition must be a parted.Partition instance")
log.debug("device %s new partedPartition %s", self.name, partition)