mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make output dir if it doesn't exist.
This commit is contained in:
parent
7aa1c5eed2
commit
19790f4a0d
@ -72,8 +72,8 @@ def main(argv=sys.argv):
|
||||
return 1
|
||||
outdir = path.abspath(args[1])
|
||||
if not path.isdir(outdir):
|
||||
print >>sys.stderr, 'Error: Cannot find output directory.'
|
||||
return 1
|
||||
print >>sys.stderr, 'Making output directory...'
|
||||
os.makedirs(outdir)
|
||||
except (IndexError, getopt.error):
|
||||
usage(argv)
|
||||
return 1
|
||||
|
@ -67,7 +67,7 @@ class Builder(object):
|
||||
self.outdir = app.outdir
|
||||
self.doctreedir = app.doctreedir
|
||||
if not path.isdir(self.doctreedir):
|
||||
os.mkdir(self.doctreedir)
|
||||
os.makedirs(self.doctreedir)
|
||||
|
||||
self.app = app
|
||||
self.warn = app.warn
|
||||
|
Loading…
Reference in New Issue
Block a user