From a5c2b089484f9aff7a852178a2a34db0140c8c5b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 12 Jan 2013 12:22:30 +0100 Subject: Write "making output directory" to the status fd, not to stderr unconditionally. --- sphinx/cmdline.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py index 5a7eafb4..5ee6380b 100644 --- a/sphinx/cmdline.py +++ b/sphinx/cmdline.py @@ -98,9 +98,6 @@ def main(argv): 'contain conf.py file.') return 1 outdir = abspath(args[1]) - if not path.isdir(outdir): - print >>sys.stderr, 'Making output directory...' - os.makedirs(outdir) except getopt.error, err: usage(argv, 'Error: %s' % err) return 1 @@ -215,6 +212,11 @@ def main(argv): warning = Tee(warning, warnfp) error = warning + if not path.isdir(outdir): + if status: + print >>status, 'Making output directory...' + os.makedirs(outdir) + try: app = Sphinx(srcdir, confdir, outdir, doctreedir, buildername, confoverrides, status, warning, freshenv, -- cgit v1.2.1