[PATCH 1/3] disklabel.commit(): DeviceError -> DeviceFormatError

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

 



While running anaconda with a patched libparted, which will actually return
an error upon commiting to a busy disk I got a traceback as the packages.py
exception handling tried to unpack the disklabel.commit() exception into
a message and a device, as disklabel.commit() was throwing a DeviceError
which normal has a message and a device. Since disklabel is a format now
commit() should throw a DeviceFormatError instead.

(And now to find out why the commit is failing)
---
 storage/formats/disklabel.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index e9cf406..b3b81ed 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -206,7 +206,7 @@ class DiskLabel(DeviceFormat):
                 udev_settle()
 
         if keepTrying:
-            raise DeviceError("cannot commit to disk after %d attempts" % (maxTries,))
+            raise DeviceFormatError("cannot commit to disk after %d attempts" % (maxTries,), )
 
     def addPartition(self, *args, **kwargs):
         partition = kwargs.get("partition", None)
-- 
1.6.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux