If you try to lookup an object too early, you might find that the tbl is still a dict; this protects such early lookups from crashing

svn: r20813
This commit is contained in:
Doug Blank 2012-12-21 18:25:37 +00:00
parent 99a1729794
commit 163545089c

View File

@ -745,6 +745,7 @@ class DbBsddbRead(DbReadBase, Callback):
return self.get_from_handle(handle, Tag, self.tag_map)
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
if isinstance(tbl, dict): return None ## trying to get object too early
if isinstance(val, UNITYPE):
val = val.encode('utf-8')
try: