From nobody Sun Feb 8 23:37:13 2026 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