From nobody Mon Apr 29 16:06:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506091492767194.4787710287053; Fri, 22 Sep 2017 07:44:52 -0700 (PDT) Received: from localhost ([::1]:59259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvPBz-0001zi-KF for importer@patchew.org; Fri, 22 Sep 2017 10:44:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvPAa-0000zx-OZ for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvPAZ-0003LO-My for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50893) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvPAZ-0003L3-H6 for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84FE6C00DBB0; Fri, 22 Sep 2017 14:43:06 +0000 (UTC) Received: from localhost (ovpn-116-204.phx2.redhat.com [10.3.116.204]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C9015C8B3; Fri, 22 Sep 2017 14:43:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 84FE6C00DBB0 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ehabkost@redhat.com From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Fri, 22 Sep 2017 11:42:58 -0300 Message-Id: <20170922144259.5956-2-ehabkost@redhat.com> In-Reply-To: <20170922144259.5956-1-ehabkost@redhat.com> References: <20170922144259.5956-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 22 Sep 2017 14:43:06 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] qemu.py: Call logging.basicConfig() automatically X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Not all scripts using qemu.py configure the Python logging module, and end up generating a "No handlers could be found for logger" message instead of actual log messages. To avoid requiring every script using qemu.py to configure logging manually, call basicConfig() when creating a QEMUMachine object. This won't affect scripts that already set up logging, but will ensure that scripts that don't configure logging keep working. Reported-by: Kevin Wolf Fixes: 4738b0a85a0c2031fddc71b51cccebce0c4ba6b1 Signed-off-by: Eduardo Habkost Message-Id: <20170921162234.847-1-ehabkost@redhat.com> Reviewed-by: Cleber Rosa Acked-by: Luk=C3=A1=C5=A1 Doktor Signed-off-by: Eduardo Habkost --- scripts/qemu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 5e02dd8e78..73d6031e02 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -89,6 +89,9 @@ class QEMUMachine(object): self._qmp =3D None self._qemu_full_args =3D None =20 + # just in case logging wasn't configured by the main script: + logging.basicConfig(level=3D(logging.DEBUG if debug else logging.W= ARN)) + def __enter__(self): return self =20 --=20 2.13.5 From nobody Mon Apr 29 16:06:34 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506091497770559.7187039795547; Fri, 22 Sep 2017 07:44:57 -0700 (PDT) Received: from localhost ([::1]:59260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvPC6-000274-GA for importer@patchew.org; Fri, 22 Sep 2017 10:44:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvPAc-00010G-QB for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvPAb-0003Mk-U9 for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvPAb-0003MQ-Nl for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:43:09 -0400 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 B9899C05178B; Fri, 22 Sep 2017 14:43:08 +0000 (UTC) Received: from localhost (ovpn-116-204.phx2.redhat.com [10.3.116.204]) by smtp.corp.redhat.com (Postfix) with ESMTP id 504286F99F; Fri, 22 Sep 2017 14:43:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B9899C05178B Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ehabkost@redhat.com From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Fri, 22 Sep 2017 11:42:59 -0300 Message-Id: <20170922144259.5956-3-ehabkost@redhat.com> In-Reply-To: <20170922144259.5956-1-ehabkost@redhat.com> References: <20170922144259.5956-1-ehabkost@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.32]); Fri, 22 Sep 2017 14:43:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] MAINTAINERS: Add Python scripts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cleber and I are volunteering to review and queue patches for the Python scripts and modules in scripts/. I'm setting "M: Odd fixes" because not all scripts are actively maintained. Signed-off-by: Eduardo Habkost Message-Id: <20170915230744.22942-1-ehabkost@redhat.com> [ehabkost: add tests/*.py too] Signed-off-by: Eduardo Habkost --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e511ba780f..d3e91496b8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1403,6 +1403,14 @@ S: Maintained F: include/sysemu/cryptodev*.h F: backends/cryptodev*.c =20 +Python scripts +M: Eduardo Habkost +M: Cleber Rosa +S: Odd fixes +F: scripts/qmp/* +F: scripts/*.py +F: tests/*.py + QAPI M: Markus Armbruster M: Michael Roth --=20 2.13.5