diff --git a/py/apigen/apigen.py b/py/apigen/apigen.py index af421e88d..69777b8e0 100644 --- a/py/apigen/apigen.py +++ b/py/apigen/apigen.py @@ -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) diff --git a/py/doc/confrest.py b/py/doc/confrest.py index b3d29ad4e..8631ac8ce 100644 --- a/py/doc/confrest.py +++ b/py/doc/confrest.py @@ -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)