From 4ba733af447860d96d8f090ad9c1dfafc935798d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jelmer=20Vernoo=C4=B3?= Date: Sat, 17 May 2014 13:36:02 +0200 Subject: [PATCH] Create db directory if it did not yet exist. This is fallout from the svn -> git migration, as git does not support empty directories. --- buildfarm/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildfarm/__init__.py b/buildfarm/__init__.py index 3708dc22..ac6add95 100644 --- a/buildfarm/__init__.py +++ b/buildfarm/__init__.py @@ -158,7 +158,9 @@ class BuildFarm(object): def _get_store(self): if self.store is not None: return self.store - db_path = os.path.join(self.path, "db", "hostdb.sqlite") + db_dir_path = os.path.join(self.path, "db") + os.mkdir(db_dir_path) + db_path = os.path.join(db_dir_path, "hostdb.sqlite") db = create_database("sqlite:%s?timeout=%f" % (db_path, self.timeout)) self.store = Store(db) setup_schema(self.store) -- 2.34.1