If I understand correctly, _getFor will match sections a bit too-inclusively. Here's the relevant code:
for section in _getSlashSections(): if path.startswith(section): res = configMap[section].get(key, '#NULL#') if res != '#NULL#': if returnSection: return section return res return defaultValue
Because it only checks startswith, isn't it possible that the path "/thing/foo" will mistakenly pull configs from a section named "/thin"?
Here's what it probably should do instead:
if path == section or path.startswith(section + "/"):