commit:     85de4ce7be209e29ef661256293b6168bcadd1a0
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 06:35:17 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 14:11:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=85de4ce7

stagebase.py: run() Add in an exception trap to cleanup mounts

 catalyst/base/stagebase.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6694e6..bd6938c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1421,7 +1421,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
                for x in self.settings["action_sequence"]:
                        print "--- Running action sequence: "+x
                        sys.stdout.flush()
-                       apply(getattr(self,x))
+                       try:
+                               apply(getattr(self,x))
+                       except Exception as error:
+                               print "Exception running action sequence %s" % x
+                               print "Error:", str(error)
+                               print "Running unbind()"
+                               self.unbind()
+                               break
 
 
        def unmerge(self):

Reply via email to