From nobody Sat Feb 7 09:37:04 2026 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570625944; cv=none; d=zoho.com; s=zohoarc; b=OOQrMxfpno1heqry4DY9WlUXHIrVe/2xNVNrYYb28u17YmEx6BTNEo1GC1oTNa9+mRt9eHDlascH27L4bZnWqztmfk7B/1fe+0wbe15iIsbIHHJXK0wcj0qPvPZ45d5luCgXgwJynsLFcCVAhVbdEg7R44wZWWLriaTR2JRnijU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570625944; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qsFj7oQyWhYJ/tfru95KIMuCE0vf3VMmFDYlfLr5wuw=; b=TmvT9RciPZtSLPlhs4TSWn8PMtqGvhCnamHaeMHnaMKhnSZbjJocIY3iE5V4IY6587F6jTx9nwAKKZkiAtldyLg80HA0Lyt7xPrrPwzTk6U2L0/YfsITR1T7B6ESfZWFBklcXVjVaOhZ64fnXNWXTurnEE7Nn85+w710RCxqoVw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1570625944759488.5954781805925; Wed, 9 Oct 2019 05:59:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C811C08C320; Wed, 9 Oct 2019 12:59:02 +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 3C69B60A9F; Wed, 9 Oct 2019 12:59:02 +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 CBA094EE68; Wed, 9 Oct 2019 12:59:01 +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 x99Cx0KA002943 for ; Wed, 9 Oct 2019 08:59:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 305C15DA8D; Wed, 9 Oct 2019 12:59:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EAF35DC18; Wed, 9 Oct 2019 12:58:58 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 9 Oct 2019 13:58:37 +0100 Message-Id: <20191009125844.18202-4-berrange@redhat.com> In-Reply-To: <20191009125844.18202-1-berrange@redhat.com> References: <20191009125844.18202-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/10] python: fix use of undeclared variables in python scripts 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: , Content-Type: text/plain; charset="utf-8" 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 09 Oct 2019 12:59:03 +0000 (UTC) docs/apibuild.py:2436:65: F821 undefined name 'first_letter' chunks.append(["chunk%s" % (chunk - 1), first_lette= r, letter]) ^ src/hyperv/hyperv_wmi_generator.py:415:57: F821 undefined name 'number' report_error("line %d: invalid block header" % (number)) ^ Signed-off-by: Daniel P. Berrang=C3=A9 --- build-aux/syntax-check.mk | 2 -- docs/apibuild.py | 1 + src/hyperv/hyperv_wmi_generator.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 1ad0c626e1..97255908b8 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -884,7 +884,6 @@ FLAKE8_WHITESPACE =3D E211,E221,E222,E225,E226,E231,E261 FLAKE8_BLANK_LINES =3D E301,E302,E303,E305 FLAKE8_LINE_LENGTH =3D E501 FLAKE8_STATEMENTS =3D E722,E741 -FLAKE8_ERRORS =3D F821 FLAKE8_WARNINGS =3D W504,W605 =20 FLAKE8_IGNORE =3D $(FLAKE8_INDENTATION),$\ @@ -892,7 +891,6 @@ FLAKE8_IGNORE =3D $(FLAKE8_INDENTATION),$\ $(FLAKE8_BLANK_LINES),$\ $(FLAKE8_LINE_LENGTH),$\ $(FLAKE8_STATEMENTS),$\ - $(FLAKE8_ERRORS),$\ $(FLAKE8_WARNINGS) \ $(NULL) =20 diff --git a/docs/apibuild.py b/docs/apibuild.py index 3f0b72d18e..dc52caf76d 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -2401,6 +2401,7 @@ class docBuilder: count =3D 0 chunk =3D 0 chunks =3D [] + first_letter =3D None for id in typ: if len(index[id]) > 30: continue diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_gen= erator.py index a9ece0ff00..4f486913bd 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -407,7 +407,7 @@ def report_error(message): =20 =20 =20 -def parse_class(block): +def parse_class(block, number): # expected format: class header_items =3D block[0][1].split() =20 @@ -489,7 +489,7 @@ def main(): if block is not None: if line =3D=3D "end": if block[0][1].startswith("class"): - parse_class(block) + parse_class(block, number) =20 block =3D None else: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list