Merge "Improve the debug logging for policyd"

This commit is contained in:
Zuul 2019-11-26 16:30:44 +00:00 committed by Gerrit Code Review
commit 43a086bc6f
1 changed files with 2 additions and 1 deletions

View File

@ -431,7 +431,8 @@ def policyd_preprocess_name(name):
:rtype: str
"""
if os.path.sep not in name:
raise policyd.BadPolicyYamlFile("No prefix for section")
raise policyd.BadPolicyYamlFile("No prefix for section: name={}"
.format(name))
horizon_service, name = os.path.split(name)
try:
policy_dir = POLICYD_HORIZON_SERVICE_TO_DIR[horizon_service]