changeset 3558:d91cdc111d2f beta

backward compat: use safe .get on show_id function CONFIG calls
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 21 Mar 2013 21:12:03 +0100
parents 58dcef7eef03
children 328eb707fe3f
files rhodecode/lib/helpers.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py	Thu Mar 21 21:03:22 2013 +0100
+++ b/rhodecode/lib/helpers.py	Thu Mar 21 21:12:03 2013 +0100
@@ -379,8 +379,8 @@
     :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: