From 9696a5e2d07e7cbd14ff9df063a4190887c47207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Fri, 1 Oct 2010 08:32:17 +0000 Subject: [PATCH] config: Just ignore if we can't create the directory --- pisi/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pisi/config.py b/pisi/config.py index 91fa0d67..97502fc2 100644 --- a/pisi/config.py +++ b/pisi/config.py @@ -90,8 +90,13 @@ class Config(object): def subdir(self, path): subdir = pisi.util.join_path(self.dest_dir(), path) - if os.access(os.path.dirname(subdir), os.W_OK): + + # If the directory does not exist, try to create it. + try: pisi.util.ensure_dirs(subdir) + except OSError: + pass + return subdir def log_dir(self):