diff --git a/bottle.py b/bottle.py index 23fff762..467c418b 100755 --- a/bottle.py +++ b/bottle.py @@ -2438,11 +2438,11 @@ def load_dict(self, source, namespace=''): """ for key, value in source.items(): if isinstance(key, basestring): - nskey = (namespace + '.' + key).strip('.') + if namespace: key = '%s.%s' % (namespace, key) if isinstance(value, dict): - self.load_dict(value, namespace=nskey) + self.load_dict(value, namespace=key) else: - self[nskey] = value + self[key] = value else: raise TypeError('Key has type %r (not a string)' % type(key)) return self