Fix: change os.mkdir to os.makedirs in case of there are more than one directory...
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:50:05 +0000 (19:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:50:05 +0000 (19:50 -0000)
According to docs.python.org, permissions may be not respected with os.makedirs... with some systems.
(trunk r15293)

svn path=/main/branches/2.1.7/; revision=15532

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: