problem in GrampsDbBase

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

problem in GrampsDbBase

Richard Taylor-2
I am just implementing the database tables for the Repository object and my
unittests found an interesting issue.

The 'has_XXX_handle' methods in GrampsDbBase are defined as follows e.g.:

 def has_repository_handle(self,handle):
        returns True if the handle exists in the current Repository database.
        return self.repository_map.has_key(str(handle)) != None

The problem is that 'has_key' on a mapping type is defined to return False
when there is no match, _not_ None.

So I think these methods will always return True.

Am I missing something?


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.
Gramps-devel mailing list
[hidden email]