From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9FEDD7291E for ; Wed, 16 Jun 2021 10:49:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 901FFF849 for ; Wed, 16 Jun 2021 10:48:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 24738F83D for ; Wed, 16 Jun 2021 10:48:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EC69442E61 for ; Wed, 16 Jun 2021 10:48:41 +0200 (CEST) Message-ID: <07702da5-a87e-9e11-09b0-44a3f3091271@proxmox.com> Date: Wed, 16 Jun 2021 10:48:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Thunderbird/90.0 Content-Language: en-US To: Lorenz Stechauner , Proxmox VE development discussion References: <20210615140841.117933-1-l.stechauner@proxmox.com> <20210615140841.117933-3-l.stechauner@proxmox.com> <7d42279c-2ca1-84d6-5256-e0aae41f47c4@proxmox.com> <3ea39263-1b5a-04f1-99eb-a412200c17d3@proxmox.com> From: Thomas Lamprecht In-Reply-To: <3ea39263-1b5a-04f1-99eb-a412200c17d3@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.938 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.095 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v8 common 2/2] tools: download_file_from_url: adapt error messages to start at new line X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2021 08:49:12 -0000 On 16.06.21 10:46, Lorenz Stechauner wrote: >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 die "ERROR, checksum mism= atch: got '$checksum_got' !=3D expect '$checksum_expected'\n"; >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; >> If, we could just include the "\n" in the start of the die, but we do = not really >> add such newlines for separating errors in general in task logs, so I'= d rather >> leave this one out. >=20 > The new line at the beginning of die does not work either :( >=20 > calculating checksum of existing file...TASK ERROR:=C2=A0 checksum mism= atch: got '73e74eef3d998d522f92295016d92fdc' !=3D expect 'asdf', aborting= >=20 > The new line was converted to an additional space and the message was p= refixed with "TASK ERROR: " >=20 > The only way I can come up with to make this work for the frontend, is = to use a print statement before the die... ah yeah, the whole error is taken prefixed with "TASK ERROR" and added to= the log as final line, so whitespace in the error itself has "no say" regarding this. OK, let's do the `print "\n"` then but lets also add a comment about the = why ^^