Fix: change os.mkdir to os.makedirs in case of there are more than one directory...
authorMounir Lamouri <volkmar@gentoo.org>
Sat, 30 Jan 2010 22:35:30 +0000 (22:35 -0000)
committerMounir Lamouri <volkmar@gentoo.org>
Sat, 30 Jan 2010 22:35:30 +0000 (22:35 -0000)
According to docs.python.org, permissions may be not respected with os.makedirs... with some systems.

svn path=/main/trunk/; revision=15293

pym/portage/cache/fs_template.py

index 7cd8af4d7c220999148a7ddd274f93e012546b9b..9ca0c9dc250bb2c25973da40a2940d57a7f5545c 100644 (file)
@@ -72,7 +72,7 @@ class FsBased(template.database):
                                        if perms == -1:
                                                perms = 0
                                        perms |= 0o755
-                                       os.mkdir(base, perms)
+                                       os.makedirs(base, perms)
                                        if self._gid != -1:
                                                os.chown(base, -1, self._gid)
                                finally: