def execute(): app = request.args[0] command = request.vars.statement session['debug_commands:' + app].append(command) try: output = web_debugger.do_exec(command) if output is None: output = "" except Exception, e: output = T("Exception %s") % str(e)
def execute(): app = request.args[0] command = request.vars.statement session['debug_commands:' + app].append(command) try: output = web_debugger.do_exec(command) if output is None: output = "" except Exception as e: output = T("Exception %s") % str(e) k = len(session['debug_commands:' + app]) - 1 return '[%i] %s%s\n' % (k + 1, command, output)