Create db directory if it did not yet exist.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 17 May 2014 11:36:02 +0000 (13:36 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 17 May 2014 11:36:02 +0000 (13:36 +0200)
This is fallout from the svn -> git migration, as git does not support
empty directories.

buildfarm/__init__.py

index 3708dc224fce1a4f0869e602f28ecf73020de017..ac6add95d793e77a2509bd243bb67a8c4809a9a1 100644 (file)
@@ -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)