diff options
Diffstat (limited to 'partedUtils.py')
-rw-r--r-- | partedUtils.py | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/partedUtils.py b/partedUtils.py index f62ef1a69..8fc03b173 100644 --- a/partedUtils.py +++ b/partedUtils.py @@ -808,20 +808,46 @@ class DiskSet: if isys.driveIsRemovable(drive) and not flags.expert: DiskSet.skippedDisks.append(drive) continue + # FIXME: need the right fix for z/VM formatted dasd + if 0 and iutil.getArch() == "s390": + rc = intf.messageWindow(_("Warning"), + _("The partition table on device %s was unreadable. " + "To create new partitions it must be initialized, " + "causing the loss of ALL DATA on this drive.\n\n" + "This operation will override any previous " + "installation choices about which drives to " + "ignore.\n\n" + "Would you like to initialize this drive, " + "erasing ALL DATA?") + % (drive,), type = "yesno") + if rc == 0: + DiskSet.skippedDisks.append(drive) + continue + else: + if (self.dasdFmt(intf, drive)): + DiskSet.skippedDisks.append(drive) + continue + try: dev = parted.PedDevice.get (deviceFile) except parted.error, msg: DiskSet.skippedDisks.append(drive) continue + if (initAll and ((clearDevs is None) or (len(clearDevs) == 0) or drive in clearDevs) and not flags.test): - try: - disk = dev.disk_new_fresh(getDefaultDiskType()) - disk.commit() - self.disks[drive] = disk - except parted.error, msg: - DiskSet.skippedDisks.append(drive) - continue + if iutil.getArch() == "s390": + if (self.dasdFmt(intf, drive)): + DiskSet.skippedDisks.append(drive) + continue + else: + try: + disk = dev.disk_new_fresh(getDefaultDiskType()) + disk.commit() + self.disks[drive] = disk + except parted.error, msg: + DiskSet.skippedDisks.append(drive) + continue try: disk = parted.PedDisk.new(dev) |