コード例 #1
0
ファイル: decorators.py プロジェクト: tbelote/sharpy
 def new(*args, **kwargs):
     raised_exception = None
     try:
         func(*args, **kwargs)
     except Exception, e:
         clear_users_func()
         raise
コード例 #2
0
    def new(*args, **kwargs):
        try:
            func(*args, **kwargs)
        except Exception:
            clear_users_func()
            raise

        clear_users_func()
コード例 #3
0
ファイル: decorators.py プロジェクト: tbelote/sharpy
def clear_users(func):
    '''
    Calls cheddar's delete all users method no matter the test result
    '''
    def new(*args, **kwargs):
        raised_exception = None
        try:
            func(*args, **kwargs)
        except Exception, e:
            clear_users_func()
            raise
            
        clear_users_func()