Changeset - d91cdc111d2f
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-03-21 21:12:03
marcin@python-works.com
backward compat: use safe .get on show_id function CONFIG calls
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -376,14 +376,14 @@ def show_id(cs):
 
    Configurable function that shows ID
 
    by default it's r123:fffeeefffeee
 

	
 
    :param cs: changeset instance
 
    """
 
    from rhodecode import CONFIG
 
    def_len = safe_int(CONFIG['sha_len'])
 
    show_rev = str2bool(CONFIG['sha_rev'])
 
    def_len = safe_int(CONFIG.get('sha_len', 12))
 
    show_rev = str2bool(CONFIG.get('sha_rev', True))
 

	
 
    raw_id = cs.raw_id[:def_len]
 
    if show_rev:
 
        return 'r%s:%s' % (cs.revision, raw_id)
 
    else:
 
        return '%s' % (raw_id)
0 comments (0 inline, 0 general)