Commit affa4924 authored by Michael Tremer's avatar Michael Tremer

python: Add new open() interface to easily open a database

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent a0e8d454
......@@ -22,3 +22,13 @@ from _location import *
# Initialise logging
from . import logger
def open(path=None):
"""
Opens the database at path, or opens the default database.
"""
if not path:
path = DATABASE_PATH
# Open the database
return Database(path)
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