diff --git a/etgtools/sphinx_generator.py b/etgtools/sphinx_generator.py index 4019f0bb..5b9dec90 100644 --- a/etgtools/sphinx_generator.py +++ b/etgtools/sphinx_generator.py @@ -1401,7 +1401,10 @@ class Snippet(Node): """ docstrings = '' - + + if not os.path.exists(os.path.dirname(self.cpp_file)): + os.makedirs(os.path.dirname(self.cpp_file)) + fid = open(self.cpp_file, 'wt') fid.write(self.snippet) fid.close() diff --git a/sphinxtools/inheritance.py b/sphinxtools/inheritance.py index a5fb9db0..b80654aa 100644 --- a/sphinxtools/inheritance.py +++ b/sphinxtools/inheritance.py @@ -237,6 +237,8 @@ class InheritanceDiagram(object): """ static_root = INHERITANCEROOT + if not os.path.exists(static_root): + os.makedirs(static_root) if self.main_class is not None: filename = self.main_class.name