Closed prmtl closed 6 years ago
Reported by s...@cloudlock.com, 2014-12-22T14:49:33Z
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. Attached patch.txt (view on Gist) From: https://code.google.com/p/pydot/issues/detail?id=97
patch.txt
Reported by s...@cloudlock.com, 2014-12-22T14:49:33Z
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. Attached
patch.txt
(view on Gist) From: https://code.google.com/p/pydot/issues/detail?id=97