WIP lookup commands

This commit is contained in:
DiG 2022-01-17 13:47:36 +01:00
parent 1c4d74aa15
commit 888864d647
1 changed files with 14 additions and 1 deletions

View File

@ -313,7 +313,20 @@ def lookup( model, domains ):
# stack.append({ 'model': model, 'id': inst.id, 'file': filename, 'data': size })
stack.append( tree )
return stack
# return stack
jlog( stack )
return [ flatten_stack( obj ) for obj in stack ]
def flatten_stack( data ):
flat = []
for key in data.keys():
if type(data[key]) != dict:
flat.append(key)
else:
result += flatten_stack(data[key])
return result
def lookup_old( model, domains ):
eprint( "> Lookup: %s %s" % (model,domains) )