From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id E288D1FF172 for <inbox@lore.proxmox.com>; Wed, 23 Apr 2025 15:28:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3A00C1B94A; Wed, 23 Apr 2025 15:28:48 +0200 (CEST) Message-ID: <ed50bdc3-d508-42e4-b3ed-47848eab4e5a@proxmox.com> Date: Wed, 23 Apr 2025 15:28:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>, Daniel Herzig <d.herzig@proxmox.com> References: <20250423130315.360403-1-d.herzig@proxmox.com> Content-Language: en-US From: Daniel Kral <d.kral@proxmox.com> In-Reply-To: <20250423130315.360403-1-d.herzig@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.013 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 pve-esxi-import-tools] fix #6347: do not break vm listing on invalid configs X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> On 4/23/25 15:03, Daniel Herzig wrote: > Move the queries for vCLS machines and empty datastore strings into > the already existing try-except routine to save `listvms.py` from > breaking when `vm.config` is `None`. > > Do not store the result of the `any` function in a variable anymore, > do the same for the datastore query to shorten code. > > Prepare more verbose logging. > > Signed-off-by: Daniel Herzig <d.herzig@proxmox.com> Oops, I should have prefixed my patch with a "fix" at least, but I've sent two patches some days ago for this ;): https://lore.proxmox.com/pve-devel/20250411150634.253684-1-d.kral@proxmox.com/T/#u But it's also good to just extend the scope of the try-catch here without the additional check for whether the vm.config has a value or not. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel