##// END OF EJS Templates
fixed edge case when connection to db fails and code reaches state of variable referenced before assignment
marcink -
r4015:669721d1 default
parent child Browse files
Show More
@@ -501,13 +501,12 b' def set_available_permissions(config):'
501 try:
501 try:
502 sa = meta.Session
502 sa = meta.Session
503 all_perms = sa.query(Permission).all()
503 all_perms = sa.query(Permission).all()
504 config['available_permissions'] = [x.permission_name for x in all_perms]
504 except Exception:
505 except Exception:
505 pass
506 log.error(traceback.format_exc())
506 finally:
507 finally:
507 meta.Session.remove()
508 meta.Session.remove()
508
509
509 config['available_permissions'] = [x.permission_name for x in all_perms]
510
511
510
512 #==============================================================================
511 #==============================================================================
513 # CHECK DECORATORS
512 # CHECK DECORATORS
General Comments 0
You need to be logged in to leave comments. Login now