summaryrefslogtreecommitdiff
path: root/sphinx/cmdline.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-01-12 12:22:30 +0100
committerGeorg Brandl <georg@python.org>2013-01-12 12:22:30 +0100
commitf022886032cffb1dec6a27d3f9ec7a73377de725 (patch)
treeb28ef25411819007c564904bbef2b36f15f1141d /sphinx/cmdline.py
parentc1176a1bdb2f614195ff35bac2e00ccbc3d29049 (diff)
downloadsphinx-git-f022886032cffb1dec6a27d3f9ec7a73377de725.tar.gz
Write "making output directory" to the status fd, not to stderr unconditionally.
Diffstat (limited to 'sphinx/cmdline.py')
-rw-r--r--sphinx/cmdline.py8
1 files 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,