Commit 4231c4f5 authored by Andoni Morales Alastruey's avatar Andoni Morales Alastruey
Browse files

oven: print the original tracebac in build step errors

parent 01e26fc2
......@@ -18,6 +18,7 @@
import tempfile
import shutil
import traceback
from cerbero.errors import BuildStepError, FatalError
from cerbero.build.recipe import Recipe, BuildSteps
......@@ -103,9 +104,8 @@ class Oven (object):
self.cookbook.update_step_status(recipe.name, step)
except FatalError:
self._handle_build_step_error(recipe, step)
except Exception, ex:
raise FatalError(_("Error performing step %s: %s") % (step,
ex))
except Exception:
raise BuildStepError(recipe, step, traceback.format_exc())
self.cookbook.update_build_status(recipe.name, False)
if self.missing_files:
......
......@@ -47,9 +47,9 @@ class CommandError(CerberoException):
class BuildStepError(CerberoException):
def __init__(self, recipe, step):
def __init__(self, recipe, step, trace=''):
CerberoException.__init__(self, _("Recipe '%s' failed at the build "
"step '%s'") % (recipe, step))
"step '%s'\n%s") % (recipe, step, trace))
class RecipeNotFoundError(CerberoException):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment