Create interim dirs automatically
authorBernie Innocenti <bernie@codewiz.org>
Mon, 27 Jul 2009 14:45:05 +0000 (16:45 +0200)
committerBernie Innocenti <bernie@codewiz.org>
Mon, 27 Jul 2009 14:45:05 +0000 (16:45 +0200)
geekigeeki.py

index 71920f370b9dd74f6c0df8b057bf308a404fa9f0..d3ce2203bdb6ef379d4fdcec2ebf6e83494e5a0c 100755 (executable)
@@ -795,6 +795,7 @@ class Page:
                 os.remove(name)
             except OSError, err:
                 if err.errno != errno.ENOENT: raise err
+        os.makedirs(os.path.split(name)[0])
         os.rename(tmp_filename, name)
 
     def save(self, newdata, changelog):