Skip to content

Commit

Permalink
[airos] renamed to more declarative name
Browse files Browse the repository at this point in the history
  • Loading branch information
edoput committed Jul 17, 2017
1 parent c7a7069 commit aee3953
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions netjsonconfig/backends/airos/airos.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def to_intermediate(self):
self.intermediate_data[k] = [x for x in flatten(intermediate_to_list(v)) if x != {}]


def flatten(xs):
def flatten(elements):
"""
Flatten a list
"""
if xs is not list:
return xs
if elements is not list:
return elements
else:
return reduce(lambda x, y: x + flatten(y), xs, [])
return reduce(lambda x, y: x + flatten(y), elements, [])


def intermediate_to_list(configuration):
Expand Down

0 comments on commit aee3953

Please sign in to comment.