From 0cf170b18e5801e92c61e5e1068b76e0fa612643 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 10 Feb 2015 21:59:39 +0100 Subject: [PATCH] prettier print when requirements are broken Signed-off-by: Nico Schottelius --- cdist/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cdist/config.py b/cdist/config.py index 73ba4710..707f4df0 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -229,12 +229,12 @@ class Config(object): for requirement in cdist_object.requirements_unfinished(cdist_object.autorequire): autorequire_names.append(requirement.name) - requirements = ", ".join(requirement_names) - autorequire = ", ".join(autorequire_names) - info_string.append("%s requires: %s autorequires: %s" % (cdist_object.name, requirements, autorequire)) + requirements = "\n ".join(requirement_names) + autorequire = "\n ".join(autorequire_names) + info_string.append("%s requires:\n %s\n%s autorequires:\n %s" % (cdist_object.name, requirements, cdist_object.name, autorequire)) - raise cdist.UnresolvableRequirementsError("The requirements of the following objects could not be resolved: %s" % - ("; ".join(info_string))) + raise cdist.UnresolvableRequirementsError("The requirements of the following objects could not be resolved:\n%s" % + ("\n".join(info_string))) def object_prepare(self, cdist_object): """Prepare object: Run type explorer + manifest"""