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

[PATCH] Fix DiskLabel.status so it returns True, not self.partedDisk, when active.



---
 storage/formats/disklabel.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index 8f003fc..5b156f6 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -147,7 +147,8 @@ class DiskLabel(DeviceFormat):
         """ Device status. """
         return (self.exists and self.device and
                 os.path.exists(self.device) and
-                self.partedDevice and self.partedDisk)
+                self.partedDevice is not None and
+                self.partedDisk is not None)
 
     def setup(self, *args, **kwargs):
         """ Open, or set up, a device. """
-- 
1.6.0.6


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