[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [libosinfo PATCH] Fix libxml error reporting



On Fri, Nov 25, 2011 at 01:34:02PM +0100, Christophe Fergeau wrote:
> On Fri, Nov 25, 2011 at 09:30:27AM +0100, Guido Günther wrote:
> > On Fri, Nov 18, 2011 at 11:03:41PM +0100, Guido Günther wrote:
> > > The error code might be set in catchXMLError so make sure we don't miss
> > > it. Otherwise this results in errors like:
> > > 
> > > /usr/lib/python2.7/dist-packages/gi/types.py:43: Warning: GError set over the top of a previous GError or uninitialized memory.
> > > This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
> > > The overwriting error message was: Incorrect root element
> > 
> > Can this be appplied?
> 
> Relooking at this, I'm a bit surprised that it's possible to have
> catchXMLError be called and to get a non NULL xml document returned. How
> are you triggering this condition ?

By running demo.py from the topleveldir of the source tree (instead of
from inside examples/):

LD_LIBRARY_PATH=/usr/local/libosinfo/lib/ GI_TYPELIB_PATH=/usr/local/libosinfo/lib/girepository-1.0/ python examples/demo.py
/usr/lib/python2.7/dist-packages/gi/types.py:43: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Incorrect root element
  return info.invoke(*args, **kwargs)
Traceback (most recent call last):
  File "examples/demo.py", line 6, in <module>
    loader.process_path("./")
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
gi._glib.GError: at line 18: Namespace prefix xi on include is not defined

Cheers, 
 -- Guido


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]