Commits

Rodrigo Bistolfi committed cd2b08d

Disk.has_partition_table should be public

Comments (0)

Files changed (1)

vinstall/backend/partitioning.py

 
         """
         assert self.disk._disk is None, "Partition table already exists?"
-#        assert self.disk._disk._has_partition_table is False, "Partition table already exists?"
+#        assert self.disk._disk.has_partition_table is False, "Partition table already exists?"
 #        assert not hasattr(self.disk, "_disk"), ".disk attribute already here.  Do we have a partition table already?"
 #        assert self.disk._disk is not None, "We already have .disk attribute.  Do we have a partition table already?"
 #        assert self.disk.type is None, "Disk already has a partition table"
         self.disk._disk = parted.freshDisk(self.disk._device, "msdos")
-        self.disk._disk._has_partition_table = True
+        self.disk._disk.has_partition_table = True
 
 
     def delete_all_partitions(self):
         """ Delete all partitions from drive
 
         """
-        assert self.disk._has_partition_table is True, "No partition table on disk."
+        assert self.disk.has_partition_table is True, "No partition table on disk."
         self.disk.deleteAllPartitions()
 
     def add_partition(self,  size=0, units='MB'):