def replace_function(*args, **kwargs): while True: try: return input_function(*args, **kwargs) except KeyboardInterrupt: raise except: log_execption() exception_mgr.on_except() time.sleep(10)
def replace_function(*args, **kwargs): request = args[0] user = user_roles.get_userinfo(request) if user: request.user = user try: return input_function(*args, **kwargs) except: full_path = request.get_full_path() exception_mgr.on_except('request url: %r' % full_path, 1) log_execption('request url: %r' % full_path, 1) raise else: response = HttpResponseRedirect("/login/") return response
def replace_function(*args, **kwargs): request = args[0] user = user_roles.get_userinfo(request) if user or True: request.user = user try: return input_function(*args, **kwargs) except: full_path = request.get_full_path() exception_mgr.on_except('request url: %r' % full_path, 1) log_execption('request url: %r' % full_path, 1) raise else: response = HttpResponseRedirect('/login/') return response