Re: [xml] Python wrappers still output some errors to stdout?



On Thu, Oct 27, 2005 at 03:02:16PM +0100, Nic Ferrier wrote:
The Python wrapper for libxml2 still outputs *some* errors to stdout.

The relevant code can be seen in GNOME's CVS here:

  http://cvs.gnome.org/viewcvs/libxml2/python/libxml.py?rev=1.36&view=markup

Here's a diff to make it stop sending errors to stdout:

--- /home/nferrier/src/libxml2-2.6.22/python/libxml.py~       2005-04-28 10:11:05.000000000 +0100
+++ /home/nferrier/src/libxml2-2.6.22/python/libxml.py        2005-10-27 15:01:05.577715792 +0100
@@ -211,7 +211,9 @@
         pass
 
     def warning(self, msg):
-        print msg
+        # print msg
+        pass
+
 
     def error(self, msg):
         raise parserError(msg)



However, I don't think that's a very good solution... the error should
probably go _somewhere_.

  hum ... right. Well they can override the class to define their own
method !

  Applied, will commit,

   thanks !

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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