From nobody Fri May 3 11:32:32 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 ARC-Seal: i=1; a=rsa-sha256; t=1587995080; cv=none; d=zohomail.com; s=zohoarc; b=Z47TeSsptjxPmB3lsfW53uBWyLTIBLSdHHTn98tVPnwJcBMBFmFw5IrNa0oLj/Yp40uhMa6P9aD/VgSEZ8NNbyqU/gKQBVHwAZxxW/fMJbDzGQag4o9yJMgRAgsR4NKCk/cgmzVchLEWm1QHmhaCyeSU0ecvVEwFN7RbFmnY55g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587995080; 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=weHpONFjccpnodOGtTKoIQJXJRJbsYNNVOyxY+KpEm8=; b=fsbvXPjAhnFXMd1Ye4iNCQltETb8iF537eV15Z8lU5tkeaxku09a16UPfeNHtbD5pUcWohjsaZbatzg3lfcxJssfVh7NYPnJpxYSAItG9JHwhU0p7v2XfetME3cdy9ChD96Fjy6bK2+3H0O0hjH6Ai6NOI4jbRaQuuNWzEPWENU= 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 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 1587995080150760.3984228161142; Mon, 27 Apr 2020 06:44:40 -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-178-PlcpOW3rPf2S4yWwkbqc2Q-1; Mon, 27 Apr 2020 09:44:36 -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 C531E8015CE; Mon, 27 Apr 2020 13:44:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95BFB60C84; Mon, 27 Apr 2020 13:44:30 +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 4F8E8180042D; Mon, 27 Apr 2020 13:44:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03RDiLUd015639 for ; Mon, 27 Apr 2020 09:44:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id EF5A12026D67; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EAC3D2026E1C for ; Mon, 27 Apr 2020 13:44:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D1A0185A59E for ; Mon, 27 Apr 2020 13:44:19 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-379-sBm85CyzPLmINVFjtDMU1g-1; Mon, 27 Apr 2020 09:44:15 -0400 Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id AA1688F6B34D for ; Mon, 27 Apr 2020 15:44:14 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VrqgTlfWyfo4; Mon, 27 Apr 2020 15:44:13 +0200 (CEST) Received: from fixa.knut.univention.de (p5B21E6AF.dip0.t-ipconnect.de [91.33.230.175]) by solig.knut.univention.de (Postfix) with ESMTPSA id A7B438F6B328; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id 0F7AA161858; Mon, 27 Apr 2020 15:44:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587995078; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=weHpONFjccpnodOGtTKoIQJXJRJbsYNNVOyxY+KpEm8=; b=FDezSZ7Ai7GNTyQH1gUJ6gBjyi/droPJkudV7tIIQrRUc5zheaWihJsT1bjOeMLpdCHkS9 5FQMaS80BbNUuLeg9xquWNqBU/sGqXZo81X4Fy2tJinYqyit5pdg9QmCq6Pd6mac7PyraJ rCYmc44JgzjLG2qsCLS8uMX/y91SBhs= X-MC-Unique: PlcpOW3rPf2S4yWwkbqc2Q-1 X-MC-Unique: sBm85CyzPLmINVFjtDMU1g-1 X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de From: Philipp Hahn To: libvir-list@redhat.com Subject: [PATCH libvirt-python 1/5] generator: Fix undefined variables file Date: Mon, 27 Apr 2020 15:44:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03RDiLUd015639 X-loop: libvir-list@redhat.com 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" Signed-off-by: Philipp Hahn --- generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator.py b/generator.py index 426f007..7f4ae1f 100755 --- a/generator.py +++ b/generator.py @@ -928,7 +928,7 @@ def buildStubs(module, api_xml): parser.close() except IOError: msg =3D sys.exc_info()[1] - print(file, ":", msg) + print(api_xml, ":", msg) sys.exit(1) =20 n =3D len(list(funcs.keys())) @@ -948,7 +948,7 @@ def buildStubs(module, api_xml): parser.close() except IOError: msg =3D sys.exc_info()[1] - print(file, ":", msg) + print(override_api_xml, ":", msg) =20 if not quiet: # XXX: This is not right, same function already in @functions --=20 2.20.1 From nobody Fri May 3 11:32:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587995107; cv=none; d=zohomail.com; s=zohoarc; b=hcxeg1sw9csoGBzyDDlb6kBa7MHuRjn37Q4LF4SeAdguxz+VqnsQyf9AulyrKiVfNGlhtOt2yeyLMoncIuEHcz+LIfb8PSulx/KukpNYa2PMCSiTCLoeJp+90aVoboP/UoqGHE7SiUD1iIoogxGyleKmi19kWJ8PCNwHEI2yaCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587995107; 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=etbutMoL2rRnLK5t+HpHmbG4P7S5lS/lXLLbsR3Q9uA=; b=K6/w2hr0xxopqzP4qhBnLfxdLSH+wQ1orFxz8cmW4FLYfgp2gcloyyQrarW3luuDquOqwAvhwWtNljilFZoDQvzGKHVe3BGxu/icxO0Uto0/MBXIgZzzN52qjE0/zSOsWdwIqLszGczfboMTSqMWi0h1o7sMVQ4KNO/NRoAknBg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1587995107386955.617740895026; Mon, 27 Apr 2020 06:45:07 -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-174-_p1PYaQ4NvqcTb0obXhu3Q-1; Mon, 27 Apr 2020 09:44:29 -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 41499468; Mon, 27 Apr 2020 13:44:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A2F960BF4; Mon, 27 Apr 2020 13:44:24 +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 AA2171809554; Mon, 27 Apr 2020 13:44:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03RDiK6F015628 for ; Mon, 27 Apr 2020 09:44:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 60B5B1000DB1; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D12B110F0DA for ; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 108B2108C269 for ; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-393-oVD6JD5LOYex0-FQpNkoFg-1; Mon, 27 Apr 2020 09:44:17 -0400 Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id 10FD48F6B35A for ; Mon, 27 Apr 2020 15:44:16 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uwRYub-z6Nek; Mon, 27 Apr 2020 15:44:14 +0200 (CEST) Received: from fixa.knut.univention.de (p5B21E6AF.dip0.t-ipconnect.de [91.33.230.175]) by solig.knut.univention.de (Postfix) with ESMTPSA id B5DFE8F6B32B; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id 10484161767; Mon, 27 Apr 2020 15:44:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587995106; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=etbutMoL2rRnLK5t+HpHmbG4P7S5lS/lXLLbsR3Q9uA=; b=To+CaLvkBBke95hjbpRPSGC3paTOSvRr1H3V6GHOLthL5KyzEI6SNQTCaIp3LuX8J926rA fF65oRYskVZF964x+miU71zO3ox7uQlhQ7JJ8B2w1nQqLySIQcKUkVWFKTl/TCimr6QYvj 2BkCltro9TMLUzRL6asJNdZH/vrc80U= X-MC-Unique: _p1PYaQ4NvqcTb0obXhu3Q-1 X-MC-Unique: oVD6JD5LOYex0-FQpNkoFg-1 X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de From: Philipp Hahn To: libvir-list@redhat.com Subject: [PATCH libvirt-python 2/5] generator: Fix string formatting Date: Mon, 27 Apr 2020 15:44:07 +0200 Message-Id: <91d5ac1db14e4c8160984d5ee72a9ed8a479ed20.1587993402.git.hahn@univention.de> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03RDiK6F015628 X-loop: libvir-list@redhat.com 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" remove excessive arguments. Signed-off-by: Philipp Hahn --- generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.py b/generator.py index 7f4ae1f..0000a14 100755 --- a/generator.py +++ b/generator.py @@ -766,7 +766,7 @@ def print_function_wrapper(module, name, output, export= , include): if file =3D=3D "python_accessor": if args[1][1] =3D=3D "char *": c_call =3D "\n VIR_FREE(%s->%s);\n" % ( - args[0][0], args[1][0], args[0][0], args[= 1][0]) + args[0][0], args[1][0]) c_call =3D c_call + " %s->%s =3D (%s)strdup((const xmlC= har *)%s);\n" % (args[0][0], args[1][0], args[1][1], args[1][0]) else: --=20 2.20.1 From nobody Fri May 3 11:32:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; 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 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587995073; cv=none; d=zohomail.com; s=zohoarc; b=HT9XujHCIajh0UnSW5jvXG4PnVTl6pZewkNClPa+5+/ne+kGZ8Vz5k9r3UXZSbMf+GJGk52r+mps+Fz9oz1wktecUWgAldcU8GIyk+teXdTMX4pT6d6/FVuSZDGpV5/MeGhaGCq5DiKvq/96DzrwT3UTEt0U8UBbxC3QFGgoTLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587995073; 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=ySxAqP37Tj1dDxrp0jy29jqxMq6AJ7feHfIbKpdY1hE=; b=UPutE3sOWDKHiM9Q6E3G62rT8E660MmwhpmffS6HvLussqGI3Y2wkAdx8vCp+rwhVIq22wIIM5yLWG2WxUw84UkCuuNIUlLmGJ1pWQTgvaiGH+ztuiAmc48bHe46lfuyGEtA9lFpRhdWk4XTIvI3sFkeLBE8gxFetBeWASGJZN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1587995072992855.0916487612479; Mon, 27 Apr 2020 06:44:32 -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-155-_BPqKMX0MaCmEWFc6430jA-1; Mon, 27 Apr 2020 09:44:29 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37B5C1895913; Mon, 27 Apr 2020 13:44:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A0811001920; Mon, 27 Apr 2020 13:44:24 +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 E12FD1809543; Mon, 27 Apr 2020 13:44:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03RDiLUj015637 for ; Mon, 27 Apr 2020 09:44:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id F09212026E1C; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB0542026FFE for ; Mon, 27 Apr 2020 13:44:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3F83A18A6668 for ; Mon, 27 Apr 2020 13:44:18 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-YVfWhkQXM4ykwadN4fFj2Q-1; Mon, 27 Apr 2020 09:44:15 -0400 Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id 434818F6B344 for ; Mon, 27 Apr 2020 15:44:14 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P5VjKcONJrZw; Mon, 27 Apr 2020 15:44:13 +0200 (CEST) Received: from fixa.knut.univention.de (p5B21E6AF.dip0.t-ipconnect.de [91.33.230.175]) by solig.knut.univention.de (Postfix) with ESMTPSA id A47618F6B327; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id 0E92A16186A; Mon, 27 Apr 2020 15:44:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587995071; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ySxAqP37Tj1dDxrp0jy29jqxMq6AJ7feHfIbKpdY1hE=; b=Z8EkAZuwy4PXUKqqVv1ovlLfhVmytSqmJpMi7iSOk3n4lf9Giug4t/IYku84mJ6MQ3ttnX 0X1Ihnq9sNT+yJtyilDB0C0scfe1l3GIsjDVaKiChFPXmjD32PhgvnLpQMGKx9MllfDu8t 3PX6FGK8RxnxGLWdE5AWFfijhV1JyNg= X-MC-Unique: _BPqKMX0MaCmEWFc6430jA-1 X-MC-Unique: YVfWhkQXM4ykwadN4fFj2Q-1 X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de From: Philipp Hahn To: libvir-list@redhat.com Subject: [PATCH libvirt-python 3/5] generator: Fix domainSnapshot.listAllChildren() Date: Mon, 27 Apr 2020 15:44:08 +0200 Message-Id: <1f0467d937d8d307f0ad2644945ea44b474a3f43.1587993402.git.hahn@univention.de> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03RDiLUj015637 X-loop: libvir-list@redhat.com 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.84 on 10.5.11.22 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" virDomainSnapshot(dom, _obj) expects a reference to the virDomain as its first argument, but virDomainSnapshot.listAllChildren() passes `self` instead: libvirt.py:6459: error: Argument 1 to "virDomainSnapshot" has incompatible = type "virDomainSnapshot"; expected "virDomain" >>> import libvirt >>> con =3D libvirt.open('test:///default') >>> dom =3D con.lookupByName("test") >>> first =3D dom.snapshotCreateXML("""First""") >>> second =3D dom.snapshotCreateXML("""Second= """) >>> child, =3D=3D first.listAllChildren() >>> second.domain() ^^^^^^^^^ >>> child.domain() ^^^^^^^^^^^^^^^^^ Signed-off-by: Philipp Hahn --- libvirt-override-virDomainSnapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override-virDomainSnapshot.py b/libvirt-override-virDo= mainSnapshot.py index ec53358..87eac86 100644 --- a/libvirt-override-virDomainSnapshot.py +++ b/libvirt-override-virDomainSnapshot.py @@ -14,6 +14,6 @@ =20 retlist =3D list() for snapptr in ret: - retlist.append(virDomainSnapshot(self, _obj=3Dsnapptr)) + retlist.append(virDomainSnapshot(self.domain(), _obj=3Dsnapptr= )) =20 return retlist --=20 2.20.1 From nobody Fri May 3 11:32:32 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 ARC-Seal: i=1; a=rsa-sha256; t=1587995115; cv=none; d=zohomail.com; s=zohoarc; b=ehHhXxjNxKO/1I1tp0Tq4LI8iFdmPSN89tU4FhLPA/Zw1ya/FxGFmwyWCHBnbo7nQbqV3653fz/ZSKQgE/oc5khoEqX3YpGWc/cPC9SW5C/ESh/VgR/qYjO378yh/sRp8UjPGK9ZU+FyuyqOd0nxpb/ivm4zRu9/X1hvvH/0l0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587995115; 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=uDUuMg7XpJDVcbtTGAK+n+wS68RBa08U/mcMcrg77rg=; b=AUUguTeYlcxgYEabqLyyfyE8/ejALrIbwEHs4P9rxd414dCOc8NpyYIme9ogWOL+ikF3qj7dZVP21tR3Q6OxSYfb7pAZvEXxr+yDyRBsHadnV06Y0aOurP48FlGBhkPqbX1q8GUP0sebyeRHh0zNHX9K6TqBEVs+/BrNfch9oWg= 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 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1587995115548156.6557113540273; Mon, 27 Apr 2020 06:45:15 -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-380-Vv6k0WiYP7-kxEYyRurDVg-1; Mon, 27 Apr 2020 09:44:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0B58107ACF7; Mon, 27 Apr 2020 13:44:30 +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 9833D50A9A; Mon, 27 Apr 2020 13:44:30 +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 520D74CAA0; Mon, 27 Apr 2020 13:44:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03RDiL6r015638 for ; Mon, 27 Apr 2020 09:44:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id ECEE02028CD3; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8D862026971 for ; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DE8E108C267 for ; Mon, 27 Apr 2020 13:44:20 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-eXCY7rg5NXGxC66Btn4xNQ-1; Mon, 27 Apr 2020 09:44:14 -0400 Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id 18D888F6B333 for ; Mon, 27 Apr 2020 15:44:13 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YCevvFrPoU6L; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) Received: from fixa.knut.univention.de (p5B21E6AF.dip0.t-ipconnect.de [91.33.230.175]) by solig.knut.univention.de (Postfix) with ESMTPSA id 9E6C58F6B326; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id 0DC1315F655; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587995114; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uDUuMg7XpJDVcbtTGAK+n+wS68RBa08U/mcMcrg77rg=; b=PKiWN4mWpCePuyCi0zT7fDlmhMbZjMlxxh88VN3jszbWY/Paasj50VeZ7JwnAA/byA26Oi I1LfyNXMsAh1i7x9mxqhRXAzkgGw9CJO1ElAa/KueLdTmK3Ft3tMuCRvRyY9qDtuJxk6vi Rs3RF7MW1jqC+qlPZ6x9hob2N9ZhAz4= X-MC-Unique: Vv6k0WiYP7-kxEYyRurDVg-1 X-MC-Unique: eXCY7rg5NXGxC66Btn4xNQ-1 X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de From: Philipp Hahn To: libvir-list@redhat.com Subject: [PATCH libvirt-python 4/5] qemu-api: Fix return type Date: Mon, 27 Apr 2020 15:44:09 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03RDiL6r015638 X-loop: libvir-list@redhat.com 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.11 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" The API XML description uses "C types": "str *" is not valid. Signed-off-by: Philipp Hahn --- libvirt-qemu-override-api.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-qemu-override-api.xml b/libvirt-qemu-override-api.xml index ca0dae9..b280a88 100644 --- a/libvirt-qemu-override-api.xml +++ b/libvirt-qemu-override-api.xml @@ -3,14 +3,14 @@ Send an arbitrary monitor command through qemu monitor of do= main - + Send a Guest Agent command to domain - + --=20 2.20.1 From nobody Fri May 3 11:32:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587995087; cv=none; d=zohomail.com; s=zohoarc; b=Xd42J7i/QVHUDSd27uozSCOvSrXXd2YakFqUsbjm+3Nd6MRklfFBgSrguqii32vTVQOkIz8mN0gVIwzz9WwdV1RrMkY6J1E1L2S+zEhDHa1gYKyQQfIJzGOB8/6HwhdwCiEcGeudc52niL2SfKoVR3G8UyazqYgJFzsIRk5Yj0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587995087; 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=u6DUrk9yKss6DQ6+dDiTTwqdN/n7sUE5DOxdCob2uO4=; b=f5d6xcHo9LWAQ2oBWjRMU+GIN4hGGTmO+icpH2UG6pDgwGaGECZx/jTljhwXyGJBnuKJcH5KtwYPDcReo06ZXBnNoBgCsMGrNWB/+TQCpfTOjsAql8UaH8Mg1LvVSKO2QyqDxXc1c1oXm4S5ol5kheSHyvDvIbG57x08va5LLnk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1587995087900771.3167383948911; Mon, 27 Apr 2020 06:44:47 -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-247--TmTAFTtMfq0sdhgzjRJrg-1; Mon, 27 Apr 2020 09:44:43 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7032D876EE2; Mon, 27 Apr 2020 13:44:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47ADC1002387; Mon, 27 Apr 2020 13:44:37 +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 004401806B0B; Mon, 27 Apr 2020 13:44:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03RDiL2w015652 for ; Mon, 27 Apr 2020 09:44:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 62FDA110F0DA; Mon, 27 Apr 2020 13:44:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F162110F0C5 for ; Mon, 27 Apr 2020 13:44:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4589A108C268 for ; Mon, 27 Apr 2020 13:44:21 +0000 (UTC) Received: from mail.univention.de (mail.univention.de [82.198.197.8]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-HeRVY-DxOb2tJrLk1qTzhg-1; Mon, 27 Apr 2020 09:44:17 -0400 Received: from localhost (localhost [127.0.0.1]) by solig.knut.univention.de (Postfix) with ESMTP id 819828F6B360 for ; Mon, 27 Apr 2020 15:44:16 +0200 (CEST) Received: from mail.univention.de ([127.0.0.1]) by localhost (solig.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gYIJtC-dbdsu; Mon, 27 Apr 2020 15:44:14 +0200 (CEST) Received: from fixa.knut.univention.de (p5B21E6AF.dip0.t-ipconnect.de [91.33.230.175]) by solig.knut.univention.de (Postfix) with ESMTPSA id 089BE8F6B32E; Mon, 27 Apr 2020 15:44:12 +0200 (CEST) Received: by fixa.knut.univention.de (Postfix, from userid 2260) id 10EFD161776; Mon, 27 Apr 2020 15:44:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587995086; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u6DUrk9yKss6DQ6+dDiTTwqdN/n7sUE5DOxdCob2uO4=; b=EFVSGEZDyr7RbwJ9ao0iSZ0q9DJIowluWdOUEWGRx51Bbn44yYLmJ3QwFRg8sRNoQ3PS+M 0wh7XiumRogRn1CwSupmy9OLfPpWgZ8lJsVPRkzetZwALhAsm83UMbmcekEz9MjRz6BTQv 53C2w6WSQeqFIH4GhPD5CmCgZV2l2/o= X-MC-Unique: -TmTAFTtMfq0sdhgzjRJrg-1 X-MC-Unique: HeRVY-DxOb2tJrLk1qTzhg-1 X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at knut.univention.de From: Philipp Hahn To: libvir-list@redhat.com Subject: [PATCH libvirt-python 5/5] libvirtaio: Fix return types of callback Date: Mon, 27 Apr 2020 15:44:10 +0200 Message-Id: <293afd961b6153d2005a856997b951f38032015b.1587993402.git.hahn@univention.de> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03RDiL2w015652 X-loop: libvir-list@redhat.com 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.84 on 10.5.11.22 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" libvirt defines the signature for the callback functions, e.g. the functions for remove() must return -1 on error and 0 on success. Raising an exception violates that contract. _remove_timeout() did not explicitly handle a double-remove and implicitly passed on the exception. update() expects no return value, so remove the pointless return to pass on None. Signed-off-by: Philipp Hahn --- libvirtaio.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libvirtaio.py b/libvirtaio.py index 328e6f2..f1811c1 100644 --- a/libvirtaio.py +++ b/libvirtaio.py @@ -370,13 +370,13 @@ class virEventAsyncIOImpl(object): https://libvirt.org/html/libvirt-libvirt-event.html#virEventUp= dateHandleFunc ''' self.log.debug('update_handle(watch=3D%d, event=3D%d)', watch, eve= nt) - return self.callbacks[watch].update(event=3Devent) + self.callbacks[watch].update(event=3Devent) =20 def _remove_handle(self, watch): '''Unregister a callback from a file handle. =20 :param int watch: file descriptor watch to stop listening on - :returns: None (see source for explanation) + :returns: -1 on error, 0 on success =20 .. seealso:: https://libvirt.org/html/libvirt-libvirt-event.html#virEventRe= moveHandleFunc @@ -386,12 +386,13 @@ class virEventAsyncIOImpl(object): callback =3D self.callbacks.pop(watch) except KeyError as err: self.log.warning('remove_handle(): no such handle: %r', err.ar= gs[0]) - raise + return -1 fd =3D callback.descriptor.fd assert callback is self.descriptors[fd].remove_handle(watch) if len(self.descriptors[fd].callbacks) =3D=3D 0: del self.descriptors[fd] callback.close() + return 0 =20 def _add_timeout(self, timeout, cb, opaque): '''Register a callback for a timer event @@ -425,20 +426,25 @@ class virEventAsyncIOImpl(object): https://libvirt.org/html/libvirt-libvirt-event.html#virEventUp= dateTimeoutFunc ''' self.log.debug('update_timeout(timer=3D%d, timeout=3D%d)', timer, = timeout) - return self.callbacks[timer].update(timeout=3Dtimeout) + self.callbacks[timer].update(timeout=3Dtimeout) =20 def _remove_timeout(self, timer): '''Unregister a callback for a timer =20 :param int timer: the timer to remove - :returns: None (see source for explanation) + :returns: -1 on error, 0 on success =20 .. seealso:: https://libvirt.org/html/libvirt-libvirt-event.html#virEventRe= moveTimeoutFunc ''' self.log.debug('remove_timeout(timer=3D%d)', timer) - callback =3D self.callbacks.pop(timer) + try: + callback =3D self.callbacks.pop(timer) + except KeyError as err: + self.log.warning('remove_timeout(): no such timeout: %r', err.= args[0]) + return -1 callback.close() + return 0 =20 =20 _current_impl =3D None --=20 2.20.1