From nobody Sun Apr 28 11:20:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1590411421; cv=none; d=zohomail.com; s=zohoarc; b=Y7VPOw2Rimlqctih0nRmsVSqMrw/bC13ISwjHLBMO30gNKZ8iskXFOwsAsHKG7FesY7WMcGCg2i7f7H6YppovUk3WPdtEPSpQYfSuFwcnDycpGMp8zaHAt8+Jlrjb58xb4TDsWHLCwNwFPFdFiqbgtWsPyla9EiC6vUh01+aUhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590411421; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=18+l2RN33a9YtCcgeu0pBUiRa2fFxeJd/l6oxIkXksE=; b=PUSOiFEbv4jRQ7LKfiutgz94zJSfduXQopmRHHsjwbDLO5XpRSmgERnOBiKYAc13spescel1mkUYQ1jKfPvBWKckWnDzyDGRiTtOx1vGXYgK5FOnpUNAbMBhRHTx4rNx1pBawNZklXTyfT/z+JsXCLqY5BX6ygJ4ufD6w59elD8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1590411420998959.662183666395; Mon, 25 May 2020 05:57:00 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-MOWWUTyJNhSFLd3jCHme7w-1; Mon, 25 May 2020 08:56:56 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 870DC107ACCA; Mon, 25 May 2020 12:56:51 +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 5EA8E60E1C; Mon, 25 May 2020 12:56:50 +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 2A88F54D37; Mon, 25 May 2020 12:56:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04PCukNM012121 for ; Mon, 25 May 2020 08:56:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id E5DE561981; Mon, 25 May 2020 12:56:46 +0000 (UTC) Received: from nautilus.redhat.com (unknown [10.40.193.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3958061980; Mon, 25 May 2020 12:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590411419; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=18+l2RN33a9YtCcgeu0pBUiRa2fFxeJd/l6oxIkXksE=; b=gSBi3g3ntrzaHbTSiIGfn7cp0CCIDlW5LfMwM0phijmB+bLQp+qqpzdMq/xuvQ26ZT+oES Uc7k2zAM3zcvXXnQFla49Yng8bZacU5n5fZ3JNKDifqB6OaKmsEX4iUXzKD5Qev3pSOqRG N00x6Mxl9eWGSA4+iBiD+wyJaRVLkgA= X-MC-Unique: MOWWUTyJNhSFLd3jCHme7w-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH] scripts: Fix E741 that pycodesyle is pointing out during syntax-check Date: Mon, 25 May 2020 14:56:42 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Erik Skultety 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: , 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" With newer pycodestyle 2.6.0 (which is part of flake8-3.8.2) reports the following pep violation during syntax-check: ../scripts/check-remote-protocol.py:95:9: E741 ambiguous variable name 'l' for l in err.strip().split("\n") On all the distros we test on, this hasn't occurred yet, but with the future update of flake8 it likely would. The fix is easy, just name the variable appropriately. Signed-off-by: Erik Skultety Reviewed-by: Michal Privoznik --- The weird thing is that E741 checking has been in pycodestyle since 2.1.0 [= 1], we now have 2.5.0 and yet only 2.6.0 is complaining about it [1] https://pycodestyle.pycqa.org/en/latest/developer.html#id8 scripts/check-remote-protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-remote-protocol.py b/scripts/check-remote-protoc= ol.py index 25caa19563..cf9e3f84a1 100644 --- a/scripts/check-remote-protocol.py +++ b/scripts/check-remote-protocol.py @@ -92,8 +92,8 @@ if out =3D=3D "" or pdwtagsproc.returncode !=3D 0: else: print("WARNING: exit code %d, pdwtags appears broken:" % pdwtagsproc.returncode, file=3Dsys.stderr) - for l in err.strip().split("\n"): - print("WARNING: %s" % l, file=3Dsys.stderr) + for line in err.strip().split("\n"): + print("WARNING: %s" % line, file=3Dsys.stderr) print("WARNING: skipping the remote protocol test", file=3Dsys.stderr) sys.exit(0) -- 2.25.4