Changeset - 9893c2fc846b
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-10-19 00:56:18
marcin@python-works.com
removed raise from log user action
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -79,28 +79,28 @@ def action_logger(user, action, repo, ip
 

	
 
        repo_name = repo.lstrip('/')
 
        user_log = UserLog()
 
        user_log.user_id = user_id
 
        user_log.action = action
 
        user_log.repository_name = repo_name
 
        user_log.repository = sa.query(Repository)\
 
            .filter(Repository.repo_name == repo_name).one()
 
        user_log.action_date = datetime.datetime.now()
 
        user_log.user_ip = ipaddr
 
        sa.add(user_log)
 
        sa.commit()
 

	
 
        log.info('Adding user %s, action %s on %s',
 
                                        user.username, action, repo)
 
    except Exception, e:
 
        raise
 
        sa.rollback()
 
        log.error('could not log user action:%s', str(e))
 

	
 
def check_repo_dir(paths):
 
    repos_path = paths[0][1].split('/')
 
    if repos_path[-1] in ['*', '**']:
 
        repos_path = repos_path[:-1]
 
    if repos_path[0] != '/':
 
        repos_path[0] = '/'
 
    if not os.path.isdir(os.path.join(*repos_path)):
 
        raise Exception('Not a valid repository in %s' % paths[0][1])
 

	
0 comments (0 inline, 0 general)