cleemesser / pydot

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

Prints to stdout if cannot load dot_parser #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If dot_parser cannot be loaded in pydot, a message is printed to stdout. I 
believe it's incorrect. A message should be printed to stderr (as in the 
following patch), or not printed at all.

*** pydot.py.orig   2012-03-20 13:48:01.009730200 +0400
--- pydot.py    2012-03-20 13:48:27.784195800 +0400
***************
*** 23,28 ****
--- 23,29 ----
  __license__ = 'MIT'

  import os
+ import sys
  import re
  import subprocess
  import tempfile
***************
*** 30,36 ****
  try:
      import dot_parser
  except Exception, e:
!     print "Couldn't import dot_parser, loading of dot files will not be 
possible."

--- 31,37 ----
  try:
      import dot_parser
  except Exception, e:
!     print >> sys.stderr, "Couldn't import dot_parser, loading of dot files 
will not be possible."

Original issue reported on code.google.com by cmr.P...@gmail.com on 20 Mar 2012 at 10:05

GoogleCodeExporter commented 9 years ago
smells like a bug, is a bug (i don't want to have unneeded module import 
failure message in my resulting data output)

Original comment by michal.b...@gmail.com on 2 Aug 2013 at 1:51

GoogleCodeExporter commented 9 years ago
Yes, the error should be printed to stderr. It will be fixed.

Original comment by ero.carr...@gmail.com on 15 Mar 2014 at 11:06

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 15 Mar 2014 at 11:06