while len(ancestors)>0:
level = level+1
newA =[]
- out = out+newLine + parent_level(level,'parent') +':' + newLine
+ thisout = newLine + parent_level(level,'parent') +':' + newLine
for ancestor in ancestors:
id = (ancestor,)
for row in run_query(s,id):
- out = out + name_html(row,newLine)+newLine
+ thisout = thisout + name_html(row,newLine)+newLine
if row[1] not in allAncestors and is_number(row[1])!=0:
newA.append(row[1])
allAncestors.append(row[1])
trackLevel.append(level)
ancestors = newA
+ if len(ancestors)>0:
+ out = out+thisout
return [out, allAncestors,trackLevel]