mirror of
https://github.com/beetbox/beets.git
synced 2025-12-26 10:34:09 +01:00
create db without prompt
This commit is contained in:
parent
1167453ed8
commit
9917f2ac3a
1 changed files with 6 additions and 0 deletions
|
|
@ -900,9 +900,15 @@ class Database:
|
|||
"""The current revision of the database. To be increased whenever
|
||||
data is written in a transaction.
|
||||
"""
|
||||
def _path_checker(self, path):
|
||||
newpath = os.path.dirname(path)
|
||||
if not os.path.isdir(newpath):
|
||||
os.makedirs(newpath)
|
||||
|
||||
|
||||
def __init__(self, path, timeout=5.0):
|
||||
self.path = path
|
||||
self._path_checker(path)
|
||||
self.timeout = timeout
|
||||
|
||||
self._connections = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue