Skip to content

Commit

Permalink
[airos] fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edoput committed Jul 20, 2017
1 parent 024ec3b commit 7c8e27b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions netjsonconfig/backends/airos/intermediate.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ def intermediate_to_list(configuration):
result = []

for element in configuration:
temp = {}
if isinstance(element, list):
for index, el in enumerate(element):
temp = {}
for key, value in el.items():
temp['{i}.{key}'.format(i=index + 1, key=key)] = value
result = result + intermediate_to_list([temp])
result = result + intermediate_to_list([temp])

elif isinstance(element, dict):
temp = {}
temp.update(shrink(element))
result.append(temp)

Expand Down

0 comments on commit 7c8e27b

Please sign in to comment.