Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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
Exemple #4
0
 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