[svn r38773] Using ensure() better (thanks, hpk ;).

--HG--
branch : trunk
This commit is contained in:
guido 2007-02-14 01:11:26 +01:00
parent d457485d1b
commit f074f6137c
2 changed files with 2 additions and 4 deletions

View File

@ -41,8 +41,7 @@ def build(pkgdir, dsa, capture):
# output dir
from py.__.conftest import option
targetdir = get_apigenpath()
if not targetdir.check(dir=True):
targetdir.ensure(dir=True)
targetdir.ensure(dir=True)
# find out what to build
all_names = dsa._get_names(filter=lambda x, y: True)

View File

@ -135,8 +135,7 @@ 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)
docpath.ensure(dir=True)
stylesheet.copy(docpath)
stylesheet = relpath(outputpath.strpath,
docpath.join(stylesheet.basename).strpath)