Example #1
0
 def render_template_into(self, template_name, this, fail=False,
                          **extra):
     """Renders a template into the artifact.  The default behavior is to
     catch the error and render it into the template with a failure marker.
     """
     try:
         rv = self.build_state.env.render_template(
             template_name, self.build_state.pad,
             this=this, **extra)
     except Exception:
         if fail:
             raise
         tb = Traceback(*sys.exc_info())
         rv = tb.render_full()
         self.set_dirty_flag()
     with self.open('wb') as f:
         f.write(rv.encode('utf-8') + b'\n')
Example #2
0
 def render_failure(self, exc_info):
     tb = Traceback(*exc_info)
     return tb.render_full()
Example #3
0
 def render_failure(self, exc_info):
     tb = Traceback(*exc_info)
     return tb.render_full()