Prevent range error crash when loading a defective database.

This commit is contained in:
John Ralls 2014-03-25 14:53:15 -07:00
parent 97d3ab49c4
commit 2a81c76e69

View File

@ -186,7 +186,7 @@ def find_idmap(key, data):
return val
def find_parent(key, data):
if len(data[5]) > 0:
if hasattr(data[5], '__len__') and len(data[5]) > 0:
val = data[5][0][0]
else:
val = ''