On 6/10/11 3:28 PM, Ryan Shaw wrote:
> Hello,
> 
> Is there any way to suppress Raptor's parser warnings when using the
> Python bindings?
> 
> I was hoping that
> 
> import warnings
> warnings.filterwarnings('ignore')
> 
> would do the trick, but no such luck.

You can set your own error handler with the handler option on the
model.parse_into_model,  model.load methods, model.parse_string_into_model

Docs say:
       If handler is given, an error handler with the signature
         def handler(code, level, facility, message, line, column, byte,
file, uri)
       is called.

then you can choose what to do with the warnings - in this case, ignore them

Dave
_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev

Reply via email to