Commit d5c1fa29 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

The SQLiteDatabase now accepts original_directory and original_extension

parent a1cbfcc8
Pipeline #9189 passed with stages
in 26 minutes and 8 seconds
......@@ -22,10 +22,10 @@ class Database(Database):
and for the data itself inside the database.
"""
def __init__(self):
def __init__(self, original_directory=None, original_extension=None):
# opens a session to the database - keep it open until the end
self.connect()
super(Database, self).__init__()
super(Database, self).__init__(original_directory, original_extension)
def __del__(self):
"""Releases the opened file descriptor"""
......
......@@ -8,7 +8,7 @@ framework). It also implements a kind of hack so that you can run
vulnerability analysis with it. """
from bob.db.base import File as BaseFile
from bob.db.base import Database as BaseDatabase
from bob.db.base import FileDatabase as BaseDatabase
from .query import Database as LDatabase
......@@ -66,8 +66,8 @@ class Database(BaseDatabase):
"""
__doc__ = __doc__
def __init__(self, max_number_of_frames=None):
super(Database, self).__init__()
def __init__(self, max_number_of_frames=None, original_directory=None, original_extension=None):
super(Database, self).__init__(original_directory, original_extension)
# call base class constructors to open a session to the database
self._db = LDatabase()
......
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