(self)
Close the database correctly.
Close the database correctly.
Close the database correctly .
def db_close(self):
        '''Close the database correctly.'''

        if self.db.filepath is not None:
            try:
                self.db.close()
            except KPError as err:
                self.control.draw_text(False,
                                       (1, 0, err.__str__()),
                                       (4, 0, 'Press any key.'))
                self.control.any_key()
        self.db = None
        self.control.db = None
def db_close ( self ) : if self . db . filepath is not None : try : self . db . close ( ) except KPError as err : self . control . draw_text ( False , ( 1 , 0 , err . __str__ ( ) ) , ( 4 , 0 , 'Press any key.' ) ) self . control . any_key ( ) self . db = None self . control . db = None