Exemplo n.º 1
0
    def _add_detailed_traceback(self, exc_info):
        vnc_cgitb.enable(format='text')
        from cStringIO  import StringIO

        tmp_file = StringIO()
        vnc_cgitb.Hook(format="text", file=tmp_file).handle(exc_info)
        tb_str = tmp_file.getvalue()
        tmp_file.close()
        self.addDetail('detailed-traceback', content.text_content(tb_str))
Exemplo n.º 2
0
def cgitb_hook(info=None, **kwargs):
    vnc_cgitb.Hook(**kwargs).handle(info or sys.exc_info())