google-code-export / pydot

Automatically exported from code.google.com/p/pydot
MIT License
1 stars 0 forks source link

Make dot_parser import error mutable #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When you import pydot without having dot_parser installed, you get a warning 
like this:

"Couldn't import dot_parser, loading of dot files will not be possible"

Since this warning is output to stdout, you can't mute it, so if you don't need 
dot_parser, you have a warning you can never silence.

The attached patch replaces the print statement with a call to warnings.warn(), 
so that the import warning can be optionally muted. 

Original issue reported on code.google.com by s...@cloudlock.com on 22 Dec 2014 at 1:49

Attachments: