From: Frank Brehm Date: Tue, 5 Nov 2019 16:05:01 +0000 (+0100) Subject: Fixing error output in lib/cr_tf/handler.py X-Git-Tag: 1.3.4~13 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=a796a03d7c1b5a4551135a1b6d4aaa3bc7ee2529;p=pixelpark%2Fcreate-terraform.git Fixing error output in lib/cr_tf/handler.py --- diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 1989f01..25bc294 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -620,17 +620,11 @@ class CreateTerraformHandler(BaseHandler): found_vspheres.append(vname) if len(found_vspheres) > 1: yaml_file_rel = os.path.relpath(str(yaml_file), os.getcwd()) - msg = _( - "There is only one, unique VSPhere definition allowed in a project file. " - "In {f!r} were found {nr} different VSPhere definitions:").format( + msg = _("There is only one, unique VSPhere definition allowed in a project file.") + '\n' + msg += _("In {f!r} were found {nr} different VSPhere definitions:").format( f=yaml_file_rel, nr=len(found_vspheres)) - msg += '\n' - first_one = True for vname in sorted(found_vspheres, key=str.lower): - if not first_one: - msg += '\n' - first_one = False - msg += ' * {!r}'.format(vname) + msg += '\n * {!r}'.format(vname) raise ExpectedHandlerError(msg) self._init_vspheres()