Permalink
Browse files

Merge pull request #13 from 100Shapes/master

Make dirs recursively
  • Loading branch information...
2 parents 54f575f + c33474d commit b19d02542b6463b0ff056d650723479062af4e62 @palewire palewire committed Dec 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bakery/views.py
View
4 bakery/views.py
@@ -39,7 +39,7 @@ def build(self):
dirname = os.path.dirname(self.build_path)
if dirname:
dirname = os.path.join(settings.BUILD_DIR, dirname)
- os.path.exists(dirname) or os.mkdir(dirname)
+ os.path.exists(dirname) or os.makedirs(dirname)
# Write out the data
outfile = open(path, 'w')
outfile.write(html)
@@ -79,7 +79,7 @@ def build_queryset(self):
dirname = os.path.dirname(self.build_path)
if dirname:
dirname = os.path.join(settings.BUILD_DIR, dirname)
- os.path.exists(dirname) or os.mkdir(dirname)
+ os.path.exists(dirname) or os.makedirs(dirname)
# Render the list page as HTML
html = self.get(self.request).render().content
# Write it out to the appointed flat file

0 comments on commit b19d025

Please sign in to comment.