6678: Database Differences Report crashes 4.0 beta svn 21228

svn: r23330
This commit is contained in:
Doug Blank 2013-10-17 12:07:04 +00:00
parent acfb99b9a2
commit 27c5f4ffc5

View File

@ -33,6 +33,7 @@ from ..plug import BasePluginManager
from ..db.dictionary import DictionaryDb
from gramps.gen.lib.handle import Handle
from ..const import GRAMPS_LOCALE as glocale
from ..constfunc import handle2internal
_ = glocale.translation.gettext
def import_as_dict(filename, user=None):
@ -142,8 +143,8 @@ def diff_dbs(db1, db2, user=None):
for item in ['Person', 'Family', 'Source', 'Citation', 'Event', 'Media',
'Place', 'Repository', 'Note', 'Tag']:
step()
handles1 = sorted(db1._tables[item]["handles_func"]())
handles2 = sorted(db2._tables[item]["handles_func"]())
handles1 = sorted([handle2internal(handle) for handle in db1._tables[item]["handles_func"]()])
handles2 = sorted([handle2internal(handle) for handle in db2._tables[item]["handles_func"]()])
p1 = 0
p2 = 0
while p1 < len(handles1) and p2 < len(handles2):