Changeset - 669721d1fe65
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 12 years ago 2013-06-18 16:39:59
marcin@python-works.com
fixed edge case when connection to db fails and code reaches state of variable referenced before assignment
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/auth.py
Show inline comments
 
@@ -501,13 +501,12 @@ def set_available_permissions(config):
 
    try:
 
        sa = meta.Session
 
        all_perms = sa.query(Permission).all()
 
        config['available_permissions'] = [x.permission_name for x in all_perms]
 
    except Exception:
 
        pass
 
        log.error(traceback.format_exc())
 
    finally:
 
        meta.Session.remove()
 

	
 
    config['available_permissions'] = [x.permission_name for x in all_perms]
 

	
 

	
 
#==============================================================================
 
# CHECK DECORATORS
0 comments (0 inline, 0 general)