From 7f0758ab75837c3c6bc0145cf81407e611565fda Mon Sep 17 00:00:00 2001 From: Philipp Volguine Date: Wed, 16 Jan 2013 03:21:03 -0500 Subject: [PATCH] build_one creates target subdirectory instead of silently failing --- sassutils/builder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sassutils/builder.py b/sassutils/builder.py index 7f6657bf..8b31d126 100644 --- a/sassutils/builder.py +++ b/sassutils/builder.py @@ -168,6 +168,8 @@ def build_one(self, package_dir, filename): root_path = os.path.join(package_dir, self.sass_path) css = compile(filename=sass_filename, include_paths=[root_path]) css_path = os.path.join(package_dir, self.css_path, css_filename) + if not os.path.exists(css_path): + os.mkdir(os.path.dirname(css_path)) with open(css_path, 'w') as f: f.write(css) return css_filename