A couple more issues in the database code

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

A couple more issues in the database code

Richard Taylor-2

I don't think that any of the _del_XXX methods in GrampsInMemBD can work.

For example, the _del_person methods is defined like this:

 def _del_person(self,handle):
        del self.id_trans[person.get_gramps_id()]
        del self.person_map[handle]

There is no 'person' object in scope here. It is the same for all the other
_del_XXX methods.

I also found a minor typo in _do_remove_object in GrampsDbBase.py.

def _do_remove_object(self,handle,trans,dmap,key,del_list):
        if not self.readonly:
            handle = str(handle)
            if not trans.batch:
                old_data = dmap.get(handle)

I think that 'transaction.add' should be 'trans.add'.

I have fixed this in the SOUR_REPO branch for now.


You can normally find me on Jabber as [hidden email]

SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
Gramps-devel mailing list
[hidden email]