Hardcode printing of "flowtext" warning to stderr

Third-party applications obviously can not handle additional output on stdout nor can they be expected to do any weird stdout/sterr redirection as we do via `options.stdout`
We probably shouldn't print anything in `scourString()` to start with unless we offer an option to disable all non-SVG output for third-party libraries to use.
This commit is contained in:
Eduard Braun 2017-04-30 04:13:44 +02:00
parent 98e3040645
commit 5bfffc2ca8

View file

@ -3328,7 +3328,7 @@ def scourString(in_string, options=None):
if options.error_on_flowtext:
raise Exception(errmsg)
else:
print("WARNING: {}".format(errmsg), file=options.ensure_value("stdout", sys.stdout))
print("WARNING: {}".format(errmsg), file=sys.stderr)
# remove descriptive elements
removeDescriptiveElements(doc, options)