Commit 9be8cf80 authored by Julien Muchembled's avatar Julien Muchembled

registry: fix --db when path does not contain a directory part

parent 1d82935d
...@@ -57,7 +57,8 @@ class RegistryServer(object): ...@@ -57,7 +57,8 @@ class RegistryServer(object):
self.sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) self.sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
# Database initializing # Database initializing
utils.makedirs(os.path.dirname(self.config.db)) db_dir = os.path.dirname(self.config.db)
db_dir and utils.makedirs(db_dir)
self.db = sqlite3.connect(self.config.db, isolation_level=None, self.db = sqlite3.connect(self.config.db, isolation_level=None,
check_same_thread=False) check_same_thread=False)
self.db.text_factory = str self.db.text_factory = str
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment