<filename>app/DAO/connection.py
import sqlite3
from sqlite3.dbapi2 import Error

class Connection():
    def __init__(self, db):
        self._database = db
        self.__conn = None

    def get_connection(self):
        '''
            make a connection to a sqlite database, return a Connection object,
            if connection fail return None 
        '''
        try:
            self.__conn = sqlite3.connect(self._database)
            return self.__conn
        except Error as e:
            print(e.args)
            print('could not connect to database')
            return self.__conn





<filename>app/DAO/connection.py
import sqlite3
from sqlite3.dbapi2 import Error

class Connection():
    def __init__(self, db):
        self._database = db
        self.__conn = None

    def get_connection(self):
        '''
            make a connection to a sqlite database, return a Connection object,
            if connection fail return None 
        '''
        try:
            self.__conn = sqlite3.connect(self._database)
            return self.__conn
        except Error as e:
            print(e.args)
            print('could not connect to database')
            return self.__conn





make a connection to a sqlite database, return a Connection object,             if connection fail return None