def send_crash(self, exc): if not hasattr(exc, "traceback"): traceback.print_exc() exc.traceback = traceback.format_exc(exc) data = {"message": str(exc), "traceback": exc.traceback, "report": make_report(exc)} data = json.dumps(data) self.emit("crash", data)
def send_crash(self, exc): if not hasattr(exc, 'traceback'): exc.traceback = traceback.format_exc(exc) data = { 'message': str(exc), 'traceback': exc.traceback, 'report': make_report() } data = json.dumps(data) self.emit('crash', data)
def handle_crash(exc): logging.error('Fatal crash occured') traceback.print_exc() exc.traceback = traceback.format_exc(exc) report_path = '/root/ajenti-crash.txt' try: report = open(report_path, 'w') except: report_path = './ajenti-crash.txt' report = open(report_path, 'w') report.write(make_report(exc)) report.close() logging.error('Crash report written to %s' % report_path) logging.error('Please submit it to https://github.com/Eugeny/ajenti/issues/new')
def handle_crash(exc): logging.error("Fatal crash occured") traceback.print_exc() exc.traceback = traceback.format_exc(exc) report_path = "/root/ajenti-crash.txt" try: report = open(report_path, "w") except: report_path = "./ajenti-crash.txt" report = open(report_path, "w") report.write(make_report(exc)) report.close() logging.error("Crash report written to %s" % report_path) logging.error("Please submit it to https://github.com/Eugeny/ajenti/issues/new")
def handle_crash(exc): logging.error('Fatal crash occured') traceback.print_exc() exc.traceback = traceback.format_exc(exc) report_path = '/root/ajenti-crash.txt' try: report = open(report_path, 'w') except: report_path = './ajenti-crash.txt' report = open(report_path, 'w') report.write(make_report(exc)) report.close() logging.error('Crash report written to %s' % report_path) logging.error( 'Please submit it to https://github.com/ajenti/ajenti/issues/new')