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:
parent
99a1729794
commit
163545089c
@ -745,6 +745,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
|||||||
return self.get_from_handle(handle, Tag, self.tag_map)
|
return self.get_from_handle(handle, Tag, self.tag_map)
|
||||||
|
|
||||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
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):
|
if isinstance(val, UNITYPE):
|
||||||
val = val.encode('utf-8')
|
val = val.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user