From b74fa4eef7f35a9de668ffea4b3308971b7e59a0 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 26 Jun 2016 00:07:53 +0100 Subject: [PATCH] Improve pylint score of dummy database --- gramps/plugins/database/dummydb.py | 391 ++++++++++++++--------------- 1 file changed, 195 insertions(+), 196 deletions(-) diff --git a/gramps/plugins/database/dummydb.py b/gramps/plugins/database/dummydb.py index a5ab64e07..2e56da34f 100644 --- a/gramps/plugins/database/dummydb.py +++ b/gramps/plugins/database/dummydb.py @@ -75,7 +75,7 @@ LOG = logging.getLogger(DBLOGNAME) # # class DbBookmarks # -#------------------------------------------------------------------------- +#------------------------------------------------------------------------- class Bookmarks: """ Dummy Bookmarks class. This needs to be defined here, because get is used to @@ -143,7 +143,7 @@ class Bookmarks: # # This processes the DummyDb class for diagnostic purposes to wrap each method # with code to log the method name and where it was called from. -#------------------------------------------------------------------------- +#------------------------------------------------------------------------- def wrapper(method): """ wrapper method that returns a 'wrapped' method which can be wrapped round @@ -151,7 +151,7 @@ def wrapper(method): that was called, and where it was called from. """ @wraps(method) - def wrapped(*args,**keywargs): + def wrapped(*args, **keywargs): """ This 'wrapped' method logs the original function that was called, and where it was called from. @@ -159,10 +159,9 @@ def wrapper(method): class_name = args[0].__class__.__name__ func_name = method.__name__ caller_frame = inspect.stack()[1] - LOG.debug('calling {}.{}()... from file {}, line {} in {}' - .format(class_name, func_name, - os.path.split(caller_frame[1])[1], - caller_frame[2], caller_frame[3])) + LOG.debug('calling %s.%s()... from file %s, line %s in %s', + class_name, func_name, os.path.split(caller_frame[1])[1], + caller_frame[2], caller_frame[3]) return method(*args, **keywargs) return wrapped @@ -172,7 +171,7 @@ class MetaClass(type): transform class by wrapping it with a diagnostic wrapper (if __debig__ is not set """ - def __new__(meta, class_name, bases, classdict): + def __new__(mcs, class_name, bases, classdict): """ When the class this is applied to (DummyDb) is instantiated, each method in the class is wrapped with a diagnostic routine. @@ -183,7 +182,7 @@ class MetaClass(type): # replace with a wrapped version attribute = wrapper(attribute) newclassdict[attributename] = attribute - return type.__new__(meta, class_name, bases, newclassdict) + return type.__new__(mcs, class_name, bases, newclassdict) class M_A_M_B(ABCMeta, MetaClass): @@ -191,7 +190,7 @@ class M_A_M_B(ABCMeta, MetaClass): Metaclass that inherits from two different metaclasses, so as to avoid error: "metaclass conflict: the metaclass of a derived class must be a (non- strict) subclass of the metaclasses of all its bases" - + See recipe: http://code.activestate.com/recipes/204197-solving-the- metaclass-conflict/ """ @@ -202,7 +201,7 @@ class M_A_M_B(ABCMeta, MetaClass): # # class DummyDb # -#------------------------------------------------------------------------- +#------------------------------------------------------------------------- class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): """ Gramps database object. This object is a dummy database class that is always @@ -247,7 +246,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Close the specified database. """ if not self.db_is_open: - LOG.warn("database is already closed") + LOG.warning("database is already closed") else: self.db_is_open = False @@ -256,8 +255,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return whether there were bookmark changes during the session. """ if not self.db_is_open: - LOG.warn("database is already closed") - LOG.warn("database is readonly") + LOG.warning("database is already closed") + LOG.warning("database is readonly") return False def find_backlink_handles(self, handle, include_classes=None): @@ -283,8 +282,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): result_list = list(find_backlink_handles(handle)) """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) return [] def find_initial_person(self): @@ -292,7 +291,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Returns first person in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return None def find_next_event_gramps_id(self): @@ -301,7 +300,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): event ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_family_gramps_id(self): @@ -310,7 +309,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): family ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_note_gramps_id(self): @@ -319,7 +318,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): note ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_media_gramps_id(self): @@ -328,7 +327,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): off the media object ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_person_gramps_id(self): @@ -337,7 +336,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): person ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_place_gramps_id(self): @@ -346,7 +345,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): place ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_repository_gramps_id(self): @@ -355,7 +354,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): off the repository ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def find_next_source_gramps_id(self): @@ -364,7 +363,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): source ID prefix. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def get_bookmarks(self): @@ -372,7 +371,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Person handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.bookmarks def get_child_reference_types(self): @@ -381,7 +380,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_default_handle(self): @@ -389,7 +388,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the default Person of the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return None def get_default_person(self): @@ -397,7 +396,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the default Person of the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return None def get_event_bookmarks(self): @@ -405,7 +404,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Event handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.event_bookmarks def get_event_cursor(self): @@ -413,7 +412,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over event objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_event_from_gramps_id(self, val): @@ -423,8 +422,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Event exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_event_from_handle(self, handle): @@ -434,8 +433,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Event exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) return None def get_event_handles(self): @@ -444,7 +443,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_event_roles(self): @@ -453,7 +452,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_event_attribute_types(self): @@ -462,7 +461,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_event_types(self): @@ -470,7 +469,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a list of all event types in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_family_attribute_types(self): @@ -479,7 +478,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_family_bookmarks(self): @@ -487,7 +486,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Family handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.family_bookmarks def get_family_cursor(self): @@ -495,7 +494,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Family objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_family_event_types(self): @@ -503,7 +502,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Deprecated: Use get_event_types """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_family_from_gramps_id(self, val): @@ -514,8 +513,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Need to be overridden by the derived class. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_family_from_handle(self, handle): @@ -525,8 +524,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Family exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_family_handles(self, sort_handles=False): @@ -537,7 +536,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by surnames. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_family_relation_types(self): @@ -546,7 +545,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_gramps_ids(self, obj_key): @@ -554,7 +553,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Returns all the keys from a table given a table name """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_media_attribute_types(self): @@ -563,7 +562,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_media_bookmarks(self): @@ -571,7 +570,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Media handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.media_bookmarks def get_media_cursor(self): @@ -579,7 +578,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Media objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_media_handles(self, sort_handles=False): @@ -590,7 +589,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by title. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_mediapath(self): @@ -598,7 +597,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the default media path of the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def get_name_group_keys(self): @@ -606,7 +605,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the defined names that have been assigned to a default grouping. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_name_group_mapping(self, surname): @@ -614,7 +613,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the default grouping name for a surname. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return "" def get_name_types(self): @@ -623,7 +622,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_origin_types(self): @@ -632,7 +631,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_note_bookmarks(self): @@ -640,7 +639,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Note handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.media_bookmarks def get_note_cursor(self): @@ -648,7 +647,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Note objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_note_from_gramps_id(self, val): @@ -658,8 +657,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Note exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_note_from_handle(self, handle): @@ -669,8 +668,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Note exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_note_handles(self): @@ -679,7 +678,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_note_types(self): @@ -688,7 +687,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_number_of_events(self): @@ -696,7 +695,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of events currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_families(self): @@ -704,7 +703,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of families currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_media(self): @@ -712,7 +711,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of media objects currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_notes(self): @@ -720,7 +719,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of notes currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_people(self): @@ -728,7 +727,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of people currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_places(self): @@ -736,7 +735,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of places currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_repositories(self): @@ -744,7 +743,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of source repositories currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_sources(self): @@ -752,7 +751,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of sources currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_number_of_tags(self): @@ -760,7 +759,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the number of tags currently in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return 0 def get_media_from_gramps_id(self, val): @@ -770,8 +769,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Media exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_media_from_handle(self, handle): @@ -781,8 +780,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Object exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_person_attribute_types(self): @@ -791,7 +790,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_person_cursor(self): @@ -799,7 +798,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Person objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_person_event_types(self): @@ -807,7 +806,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Deprecated: Use get_event_types """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_person_from_gramps_id(self, val): @@ -817,8 +816,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Person exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_person_from_handle(self, handle): @@ -828,8 +827,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Person exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_person_handles(self, sort_handles=False): @@ -840,7 +839,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by surnames. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_source_attribute_types(self): @@ -849,7 +848,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_place_bookmarks(self): @@ -857,7 +856,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Place handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.place_bookmarks def get_place_cursor(self): @@ -865,7 +864,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Place objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_place_from_gramps_id(self, val): @@ -875,8 +874,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Place exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_place_from_handle(self, handle): @@ -886,8 +885,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Place exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_place_handles(self, sort_handles=False): @@ -898,7 +897,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by Place title. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_raw_event_data(self, handle): @@ -906,8 +905,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Event object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_family_data(self, handle): @@ -915,8 +914,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Family object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_note_data(self, handle): @@ -924,8 +923,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Note object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_media_data(self, handle): @@ -933,8 +932,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Family object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_person_data(self, handle): @@ -942,8 +941,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Person object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_place_data(self, handle): @@ -951,8 +950,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Place object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_repository_data(self, handle): @@ -960,8 +959,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Repository object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_source_data(self, handle): @@ -969,8 +968,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Source object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_citation_data(self, handle): @@ -978,8 +977,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Citation object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_raw_tag_data(self, handle): @@ -987,8 +986,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return raw (serialized and pickled) Tag object from handle """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_repo_bookmarks(self): @@ -996,7 +995,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Repository handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.repo_bookmarks def get_repository_cursor(self): @@ -1004,7 +1003,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Repository objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_repository_from_gramps_id(self, val): @@ -1014,8 +1013,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Repository exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_repository_from_handle(self, handle): @@ -1025,8 +1024,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Repository exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_repository_handles(self): @@ -1035,7 +1034,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_repository_types(self): @@ -1044,7 +1043,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_researcher(self): @@ -1053,7 +1052,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): of the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return None def get_save_path(self): @@ -1067,7 +1066,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Source handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.source_bookmarks def get_source_cursor(self): @@ -1075,7 +1074,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Source objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_source_from_gramps_id(self, val): @@ -1085,8 +1084,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Source exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_source_from_handle(self, handle): @@ -1096,8 +1095,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Source exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_source_handles(self, sort_handles=False): @@ -1108,7 +1107,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by Source title. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_source_media_types(self): @@ -1117,7 +1116,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): instances in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_citation_bookmarks(self): @@ -1125,7 +1124,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of Citation handles in the bookmarks. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return self.citation_bookmarks def get_citation_cursor(self): @@ -1133,7 +1132,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Citation objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_citation_from_gramps_id(self, val): @@ -1143,8 +1142,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Citation exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("gramps_id %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("gramps_id %s does not exist in the dummy database", val) return None def get_citation_from_handle(self, handle): @@ -1154,8 +1153,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Citation exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_citation_handles(self, sort_handles=False): @@ -1166,7 +1165,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by Citation title. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_surname_list(self): @@ -1174,7 +1173,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return the list of locale-sorted surnames contained in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_tag_cursor(self): @@ -1182,7 +1181,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return a reference to a cursor over Tag objects """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_tag_from_handle(self, handle): @@ -1192,8 +1191,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Tag exists, a HandleError is raised. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("handle %s does not exist in the dummy database" % handle) + LOG.warning("database is closed") + LOG.warning("handle %s does not exist in the dummy database", handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) def get_tag_from_name(self, val): @@ -1203,8 +1202,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If no such Tag exists, None is returned. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("tag name %s does not exist in the dummy database" % val) + LOG.warning("database is closed") + LOG.warning("tag name %s does not exist in the dummy database", val) return None def get_tag_handles(self, sort_handles=False): @@ -1215,7 +1214,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): If sort_handles is True, the list is sorted by Tag name. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_url_types(self): @@ -1224,7 +1223,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def get_place_types(self): @@ -1233,7 +1232,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def has_event_handle(self, handle): @@ -1241,7 +1240,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Event database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_family_handle(self, handle): @@ -1249,7 +1248,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Family database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_gramps_id(self, obj_key, gramps_id): @@ -1259,7 +1258,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Not used in current codebase """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_name_group_key(self, name): @@ -1267,7 +1266,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return if a key exists in the name_group table. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_note_handle(self, handle): @@ -1275,7 +1274,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Note database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_media_handle(self, handle): @@ -1283,7 +1282,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Mediadatabase. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_person_handle(self, handle): @@ -1291,7 +1290,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Person database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_place_handle(self, handle): @@ -1299,7 +1298,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Place database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_repository_handle(self, handle): @@ -1307,7 +1306,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Repository database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_source_handle(self, handle): @@ -1315,7 +1314,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Source database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def has_tag_handle(self, handle): @@ -1323,7 +1322,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return True if the handle exists in the current Tag database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return False def is_open(self): @@ -1337,7 +1336,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Citations in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_event_handles(self): @@ -1345,7 +1344,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Events in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_events(self, order_by=None): @@ -1353,7 +1352,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Events in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_families(self, order_by=None): @@ -1361,7 +1360,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Families in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_family_handles(self): @@ -1369,7 +1368,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Families in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_media_handles(self): @@ -1377,7 +1376,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Media in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_media(self, order_by=None): @@ -1385,7 +1384,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Medias in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_note_handles(self): @@ -1393,7 +1392,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Notes in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_notes(self, order_by=None): @@ -1401,7 +1400,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Notes in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_people(self, order_by=None): @@ -1409,7 +1408,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Persons in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_person_handles(self): @@ -1417,7 +1416,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Persons in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_place_handles(self): @@ -1425,7 +1424,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Places in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_places(self, order_by=None): @@ -1433,7 +1432,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Places in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_repositories(self, order_by=None): @@ -1441,7 +1440,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Repositories in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_repository_handles(self): @@ -1449,7 +1448,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Repositories in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_source_handles(self): @@ -1457,7 +1456,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Sources in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_sources(self, order_by=None): @@ -1465,7 +1464,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Sources in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_tag_handles(self): @@ -1473,7 +1472,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over handles for Tags in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def iter_tags(self, order_by=None): @@ -1481,7 +1480,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Return an iterator over objects for Tags in the database """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return [] def load(self, name, callback=None, mode=None, force_schema_upgrade=False, @@ -1499,8 +1498,8 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): Add 1 to the number of bookmark changes during this session. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("databse is readonly") + LOG.warning("database is closed") + LOG.warning("databse is readonly") def request_rebuild(self): """ @@ -1513,15 +1512,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): single database-rebuild signal. """ if not self.db_is_open: - LOG.warn("database is closed") - LOG.warn("databse is readonly") + LOG.warning("database is closed") + LOG.warning("databse is readonly") def version_supported(self): """ Return True when the file has a supported version. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") return True def set_event_id_prefix(self, val): @@ -1532,7 +1531,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as E%d or E%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_family_id_prefix(self, val): """ @@ -1541,7 +1540,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): that contains a C/Python style format string using %d, such as F%d or F%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_note_id_prefix(self, val): """ @@ -1551,7 +1550,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as N%d or N%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_media_id_prefix(self, val): """ @@ -1561,7 +1560,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as O%d or O%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_person_id_prefix(self, val): """ @@ -1571,7 +1570,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as I%d or I%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_place_id_prefix(self, val): """ @@ -1581,14 +1580,14 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as P%d or P%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_prefixes(self, person, media, family, source, citation, place, event, repository, note): """ Set the prefixes for the gramps ids for all gramps objects """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_repository_id_prefix(self, val): """ @@ -1598,7 +1597,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as R%d or R%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_source_id_prefix(self, val): """ @@ -1608,28 +1607,28 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): in a format that contains a C/Python style format string using %d, such as S%d or S%04d. """ - LOG.warn("databse is readonly") + LOG.warning("databse is readonly") def set_mediapath(self, path): """ Set the default media path for database, path should be utf-8. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") def set_researcher(self, owner): """ Set the information about the owner of the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") def set_save_path(self, path): """ Set the save path for the database. """ if not self.db_is_open: - LOG.warn("database is closed") + LOG.warning("database is closed") def get_dbid(self): """