[blivet:master 10/10] Replace with a semantically equivalent chunk.

mulhern amulhern at redhat.com
Tue Mar 25 15:49:09 UTC 2014


This was motivated by a complaint about unused variable path.

Signed-off-by: mulhern <amulhern at 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)
-- 
1.8.3.1



More information about the anaconda-patches mailing list