[libvirt] [PATCH] complete virterror->virerror name change

Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/generator.py b/python/generator.py index 5d27f66..71ca883 100755 --- a/python/generator.py +++ b/python/generator.py @@ -123,7 +123,7 @@ class docParser(xml.sax.handler.ContentHandler): self.function_return_field = attrs['field'] elif tag == 'enum': if (attrs['file'] == "libvirt" or - attrs['file'] == "virterror"): + attrs['file'] == "virerror"): enum(attrs['type'],attrs['name'],attrs['value']) elif attrs['file'] == "libvirt-lxc": lxc_enum(attrs['type'],attrs['name'],attrs['value']) @@ -137,7 +137,7 @@ class docParser(xml.sax.handler.ContentHandler): if self.function != None: if (self.function_module == "libvirt" or self.function_module == "virevent" or - self.function_module == "virterror"): + self.function_module == "virerror"): function(self.function, self.function_descr, self.function_return, self.function_args, self.function_file, self.function_module, -- 1.8.0

On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK. Bummer - that means the python bindings are broken in the 1.0.2 release. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Wed, Jan 30, 2013 at 08:16:59PM -0700, Eric Blake wrote:
On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Bummer - that means the python bindings are broken in the 1.0.2 release.
I wonder if there's anything we could change in the generator to make this a fatal error in future, instead of silently dropped Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Wed, Jan 30, 2013 at 9:16 PM, Eric Blake <eblake@redhat.com> wrote:
On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Bummer - that means the python bindings are broken in the 1.0.2 release.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Pushed. -- Doug Goldstein

Quoting Eric Blake (eblake@redhat.com):
On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Bummer - that means the python bindings are broken in the 1.0.2 release.
D'oh, with my patch, Chuck was also getting the following error: chuck@homer:~/work/server/libvirt/libvirt-1.0.2/python/tests$ python error.py Traceback (most recent call last): File "error.py", line 35, in <module> elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \ AttributeError: 'module' object has no attribute 'VIR_ERR_NO_CONNECT' presumably because include/libvirt/virterror.h still exists, and my patch was over-zealous. -serge

On 02/01/2013 12:55 PM, Serge Hallyn wrote:
Quoting Eric Blake (eblake@redhat.com):
On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Bummer - that means the python bindings are broken in the 1.0.2 release.
D'oh, with my patch, Chuck was also getting the following error:
chuck@homer:~/work/server/libvirt/libvirt-1.0.2/python/tests$ python error.py Traceback (most recent call last): File "error.py", line 35, in <module> elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \ AttributeError: 'module' object has no attribute 'VIR_ERR_NO_CONNECT'
presumably because include/libvirt/virterror.h still exists, and my patch was over-zealous.
Does that mean we need a followup patch that looks for both virerror AND virterror? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Quoting Eric Blake (eblake@redhat.com):
On 02/01/2013 12:55 PM, Serge Hallyn wrote:
Quoting Eric Blake (eblake@redhat.com):
On 01/30/2013 08:05 PM, Serge Hallyn wrote:
Without these two string changes in generator.py, the virGetLastError wrapper does not get created in /usr/share/pyshared/libvirt.py. Noticed when running tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> --- python/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Bummer - that means the python bindings are broken in the 1.0.2 release.
D'oh, with my patch, Chuck was also getting the following error:
chuck@homer:~/work/server/libvirt/libvirt-1.0.2/python/tests$ python error.py Traceback (most recent call last): File "error.py", line 35, in <module> elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \ AttributeError: 'module' object has no attribute 'VIR_ERR_NO_CONNECT'
presumably because include/libvirt/virterror.h still exists, and my patch was over-zealous.
Does that mean we need a followup patch that looks for both virerror AND virterror?
I'm afraid so. I don't know if keeping virterror.h with that name was intentional or not, and can't claim to understand generator.py enough to know if there is a better fix. (To test, build and install the new libvirt, and cd libvirt-1.0.2/python/tests and run ./error.py) -serge
participants (4)
-
Daniel P. Berrange
-
Doug Goldstein
-
Eric Blake
-
Serge Hallyn