Permalink
Browse files

Make dirs recursively

  • Loading branch information...
Michele Memoli
Michele Memoli committed Dec 2, 2012
1 parent 54f575f commit c33474d879698aa9bd9cc8480513d643db2dc08f
Showing with 2 additions and 2 deletions.
  1. +2 −2 bakery/views.py
View
@@ -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 c33474d

Please sign in to comment.