Fixed a problem with the creation of nested directory
authorGianluca Montecchi <gian@grys.it>
Wed, 21 Oct 2009 21:30:35 +0000 (23:30 +0200)
committerGianluca Montecchi <gian@grys.it>
Wed, 21 Oct 2009 21:30:35 +0000 (23:30 +0200)
(i.e.: be html -o dir1/dir2 failed to create dir2 if dir1 does not exists)

becommands/html.py

index 232aa80a24b7d002f0c71f570663ecfda6276d75..708077e143361f2646204f2607df035003a5dc69 100644 (file)
@@ -173,7 +173,7 @@ class HTMLGen (object):
         self.out_dir = os.path.abspath(os.path.expanduser(out_dir))
         if not os.path.exists(self.out_dir):
             try:
-                os.mkdir(self.out_dir)
+                os.makedirs(self.out_dir)
             except:
                 raise cmdutil.UsageError, "Cannot create output directory '%s'." % self.out_dir
         self.out_dir_bugs = os.path.join(self.out_dir, "bugs")