git.samba.org
/
build-farm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4ba733a
)
Only create db directory if it does not yet exist.
author
Jelmer Vernooij
<jelmer@samba.org>
Sun, 18 May 2014 08:50:18 +0000
(10:50 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Sun, 18 May 2014 08:50:18 +0000
(10:50 +0200)
buildfarm/__init__.py
patch
|
blob
|
history
diff --git
a/buildfarm/__init__.py
b/buildfarm/__init__.py
index ac6add95d793e77a2509bd243bb67a8c4809a9a1..7c4428e80bd4aa374ce425f68f8a9b3c0d42a615 100644
(file)
--- a/
buildfarm/__init__.py
+++ b/
buildfarm/__init__.py
@@
-159,7
+159,8
@@
class BuildFarm(object):
if self.store is not None:
return self.store
db_dir_path = os.path.join(self.path, "db")
- os.mkdir(db_dir_path)
+ if not os.path.isdir(db_dir_path):
+ 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)