From f022886032cffb1dec6a27d3f9ec7a73377de725 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 12 Jan 2013 12:22:30 +0100 Subject: [PATCH] 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 5a7eafb40..5ee6380b1 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,