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