From nobody Sat Jul 5 15:56:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521296735925842.0822179689496; Sat, 17 Mar 2018 07:25:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C2A97FDE1; Sat, 17 Mar 2018 14:25:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A72380E99; Sat, 17 Mar 2018 14:25:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 072624CA9A; Sat, 17 Mar 2018 14:25:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2HENxmN000565 for ; Sat, 17 Mar 2018 10:23:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 845397B547; Sat, 17 Mar 2018 14:23:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DEB376133 for ; Sat, 17 Mar 2018 14:23:59 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 380F519CBB1 for ; Sat, 17 Mar 2018 14:23:57 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id z8so4581580wrh.7 for ; Sat, 17 Mar 2018 07:23:57 -0700 (PDT) Received: from rst.Home ([2a02:c7d:692a:c500:1ebc:73f3:5f60:b131]) by smtp.gmail.com with ESMTPSA id i66sm11060550wmd.0.2018.03.17.07.23.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Mar 2018 07:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EwpKUrTuphSh5nqxPFb4v7QuUHsNEuPTPp7iL19TvdM=; b=h+qZh8e9D/6wzLodOpnTH6N8XEaBRUXaSysdDb3KTdf6n6y2VMxwvagv7uRT+GR2lB tvCSCVmZXiD4sDvb8fx95xoYk6bJglhpk8q13ZRmiUZcQ3xdLYdR/gkC18ipzqqiQxjk nDKa2fVynzXziUZMKroFPaYZ+yU+7wxXYOZlS4YN79EVt2svl8YVMcWJ+MuD5++lXYqA iig8e3iQK4ttsgkoukGWyf6fXcCXtFN3xpdsZ8iEPGoRp7rxuXYRaXVaznvkpsODvkbX urBbjmcXYtpMDr6op1hl7dLbu5EjW/853EtS4KwXHTlf6wDGVOMElsL8TwaJX+/UZ/4c 5Xuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EwpKUrTuphSh5nqxPFb4v7QuUHsNEuPTPp7iL19TvdM=; b=i/SQpSGM8MYo7f2wYp9DHbc8k6kc+nw96NDjCrj/c+fE9W8Avh0pCFYIR8xTf/jdyr bttXXv8Etvq5NAYe/nU2MpOltpF7xz2AHjDzCCtbdtnPpR+JABLtA0Lg5wO73LDmGR8D o3GrsKkte1wodf9WiG0mIfmaBHto8fyQM17byTm9TpvGDq4sl3B/8CP8VcwdT+z89EHg WhYUKUFmZH8CcIVN0M2YfBzfBIQ+GO4JkTgz1ZLYaEtmd85ImA78o0OLUDFYUCWbZZwI Oq5kAZnLt+0fV40U5w50mqWRBXyKDQfmJamsw5KUWX7J2dS4JsnqMwf6TnxYYQqmkDh0 Ih6g== X-Gm-Message-State: AElRT7FVXdpGoLlwnjxwhyp79I+G30q5lkgUBHYuUKq5uFuPv5YPijxV l2cNC6dQGLOP2xUt5ZPxsNfX5wjM X-Google-Smtp-Source: AG47ELtove7dAsK38SJelJoWPSJA08eQb0gY7yu9GPdM+uDKqOq3tRajFz0cSBSTgTVzN0PLyvvgJA== X-Received: by 10.223.182.174 with SMTP id j46mr4813354wre.43.1521296635630; Sat, 17 Mar 2018 07:23:55 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Sat, 17 Mar 2018 14:23:26 +0000 Message-Id: <20180317142340.11653-9-rstoyanov1@gmail.com> In-Reply-To: <20180317142340.11653-1-rstoyanov1@gmail.com> References: <20180317142340.11653-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 17 Mar 2018 14:23:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 17 Mar 2018 14:23:57 +0000 (UTC) for IP:'209.85.128.194' DOMAIN:'mail-wr0-f194.google.com' HELO:'mail-wr0-f194.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.194 mail-wr0-f194.google.com 209.85.128.194 mail-wr0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCH 08/22] esx_vi_generator: Simplify alignment function X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 17 Mar 2018 14:25:35 +0000 (UTC) X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Generate whitespace using the standard function ljust() that is available in both Py3 [1] and Py2 [2]. 1: https://docs.python.org/3/library/stdtypes.html?highlight=3Dstrip#str.lj= ust 2: https://docs.python.org/2.7/library/string.html#string.ljust Signed-off-by: Radostin Stoyanov Reviewed-by: Daniel P. Berrang=C3=A9 --- src/esx/esx_vi_generator.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index e4890c61b..0dca44fed 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -49,10 +49,7 @@ separator =3D "/* " + ("* " * 37) + "*\n" =20 =20 def aligned(left, right, length=3D59): - while len(left) < length: - left +=3D " " - - return left + right + return left.ljust(length, ' ') + right =20 =20 =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list