Fix regression with snapshot handling (rhbz #1888709)

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-10-15 16:03:57 +01:00
parent c4af137b52
commit 0f9904c901
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 613411502d2cdf3541837710239409044a376b0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Tue, 6 Oct 2020 10:30:59 +0100
Subject: [PATCH] fix constructor param name for virDomainSnapshot /
virDomainCheckpoint
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes 7f021c21d6a091ca33615852d6061e75b2500f3f
Resolves https://gitlab.com/libvirt/libvirt-python/-/issues/4
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
generator.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator.py b/generator.py
index 3eb997f..43183b4 100755
--- a/generator.py
+++ b/generator.py
@@ -1482,7 +1482,7 @@ def buildWrappers(module: str) -> None:
classes.write(" def __init__(self, conn, _obj=None):\n")
classes.write(" self._conn = conn\n")
elif classname in ["virDomainCheckpoint", "virDomainSnapshot"]:
- classes.write(" def __init__(self, net, _obj=None):\n")
+ classes.write(" def __init__(self, dom, _obj=None):\n")
classes.write(" self._dom = dom\n")
classes.write(" self._conn = dom.connect()\n")
elif classname in ["virNetworkPort"]:
--
2.26.2

View File

@ -15,8 +15,9 @@
Summary: The libvirt virtualization API python3 binding
Name: libvirt-python
Version: 6.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz
Patch1: 0001-fix-constructor-param-name-for-virDomainSnapshot-vir.patch
Url: http://libvirt.org
License: LGPLv2+
BuildRequires: libvirt-devel == %{version}
@ -56,6 +57,7 @@ of recent versions of Linux (and other OSes).
%prep
%setup -q
%patch1 -p1
# Unset execute bit for example scripts; it can introduce spurious
# RPM dependencies, like /usr/bin/python3
@ -99,6 +101,9 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%changelog
* Thu Oct 15 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-2
- Fix regression with snapshot handling (rhbz #1888709)
* Fri Oct 02 2020 Cole Robinson <crobinso@redhat.com> - 6.8.0-1
- Update to version 6.8.0