[svn r38772] Make sure target dir exists before writing files to it.
--HG-- branch : trunk
This commit is contained in:
parent
13c44faa38
commit
d457485d1b
|
@ -41,7 +41,8 @@ def build(pkgdir, dsa, capture):
|
|||
# output dir
|
||||
from py.__.conftest import option
|
||||
targetdir = get_apigenpath()
|
||||
targetdir.ensure(dir=True)
|
||||
if not targetdir.check(dir=True):
|
||||
targetdir.ensure(dir=True)
|
||||
|
||||
# find out what to build
|
||||
all_names = dsa._get_names(filter=lambda x, y: True)
|
||||
|
|
|
@ -135,6 +135,8 @@ class Project:
|
|||
stylesheet = self.stylesheet
|
||||
if isinstance(self.stylesheet, py.path.local):
|
||||
if not docpath.join(stylesheet.basename).check():
|
||||
if not docpath.check(dir=True):
|
||||
docpath.ensure(dir=True)
|
||||
stylesheet.copy(docpath)
|
||||
stylesheet = relpath(outputpath.strpath,
|
||||
docpath.join(stylesheet.basename).strpath)
|
||||
|
|
Loading…
Reference in New Issue