changeset 6479:925d21b872e7

config: fix bad beaker configuration parsing after 8377f2bfb88f
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 23 Jan 2017 19:45:54 +0100
parents c0b2410d63a5
children de37fcbce8c5
files kallithea/lib/utils.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Mon Jan 23 02:17:38 2017 +0900
+++ b/kallithea/lib/utils.py	Mon Jan 23 19:45:54 2017 +0100
@@ -631,11 +631,12 @@
     # Find all regions, apply defaults, and apply to beaker
     if cache_settings['regions']:
         for region in cache_settings['regions'].split(','):
-            region = region.strip() + '.'
+            region = region.strip()
+            prefix = region + '.'
             region_settings = {}
             for key in cache_settings:
-                if key.startswith(region):
-                    name = key[len(region):]
+                if key.startswith(prefix):
+                    name = key[len(prefix):]
                     region_settings[name] = cache_settings[key]
             region_settings.setdefault('expire',
                                        cache_settings.get('expire', '60'))