diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-09-30 22:49:02 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2009-10-01 09:38:29 +0200 |
commit | 161946c44653d53799f0dfa899df20a43a07d53a (patch) | |
tree | 7e89d4d73721d0a22dccab3cb71115a363146fe7 /storage/formats/disklabel.py | |
parent | 4669532f295438496cd9e1a59fc3445290f0e7eb (diff) | |
download | anaconda-161946c44653d53799f0dfa899df20a43a07d53a.tar.gz anaconda-161946c44653d53799f0dfa899df20a43a07d53a.tar.xz anaconda-161946c44653d53799f0dfa899df20a43a07d53a.zip |
Don't retry commiting partition table to disk
Since the parted ebusy errors due to unnecessary udev event generation on the
partition nodes bug has been nailed, we no longer need the retry loop around
committing to disk.
Diffstat (limited to 'storage/formats/disklabel.py')
-rw-r--r-- | storage/formats/disklabel.py | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py index a387c56bd..192f1da9a 100644 --- a/storage/formats/disklabel.py +++ b/storage/formats/disklabel.py @@ -197,23 +197,12 @@ class DiskLabel(DeviceFormat): def commit(self): """ Commit the current partition table to disk and notify the OS. """ - # give committing 5 tries, failing that, raise an exception - attempt = 1 - maxTries = 5 - keepTrying = True - - while keepTrying and (attempt <= maxTries): - try: - self.partedDisk.commit() - keepTrying = False - except parted.DiskException as msg: - log.warning(msg) - attempt += 1 - else: - udev_settle() - - if keepTrying: - raise DeviceFormatError("cannot commit to disk after %d attempts" % (maxTries,), ) + try: + self.partedDisk.commit() + except parted.DiskException as msg: + raise DeviceFormatError(msg) + else: + udev_settle() def commitToDisk(self): """ Commit the current partition table to disk. """ |