[master 2/5] Make a better effort to clean up loop devices on failure.
dwlehman
installerbot-noreply at redhat.com
Wed Jul 29 14:32:08 UTC 2015
From: David Lehman <dlehman at redhat.com>
---
tests/loopbackedtestcase.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/loopbackedtestcase.py b/tests/loopbackedtestcase.py
index a4a6d40..b87006b 100644
--- a/tests/loopbackedtestcase.py
+++ b/tests/loopbackedtestcase.py
@@ -124,7 +124,9 @@ def setUp(self):
self._loopMap.append((dev, store))
self.loopDevices.append(dev)
- def tearDown(self):
+ self.addCleanup(self._cleanUp)
+
+ def _cleanUp(self):
# Guarantees that every item in _loopMap receives a minimum of
# three chances to be removed or deleted as appropriate.
num_tries = 3 * len(self._loopMap)
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/3116bcc7bac78204434027c136c2dd78b804a70e
More information about the anaconda-patches
mailing list