From 2b1405624f4505e1fcb077fb71714f7ecfe65a80 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 3 Jan 2015 09:01:48 -0500 Subject: [PATCH] Fixes to DictionaryDb for Python3 and current gramps --- gramps/gen/db/dictionary.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gramps/gen/db/dictionary.py b/gramps/gen/db/dictionary.py index ebd5bdb3f..3fc43795e 100644 --- a/gramps/gen/db/dictionary.py +++ b/gramps/gen/db/dictionary.py @@ -68,16 +68,17 @@ class Cursor(object): def __enter__(self): return self def __iter__(self): - return self.__next__() + return self def __next__(self): for handle in self.model.keys(): - yield (handle, self.func(handle)) + return (handle, self.func(handle)) + def next(self): + for handle in self.model.keys(): + return (handle, self.func(handle)) def __exit__(self, *args, **kwargs): pass - def iter(self): - for handle in self.model.keys(): - yield (handle, self.func(handle)) - yield None + def close(self): + pass class Bookmarks: def get(self):